aboutsummaryrefslogtreecommitdiffstats
path: root/include/core/SkPaint.h
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-11-18 15:51:29 -0800
committerSteve Kondik <shade@chemlab.org>2012-11-18 15:51:29 -0800
commita0a3a4d3f7e368311d896eaca0a22732a81d37fb (patch)
treec4590b3f4713d99a0f55be9f270231ce56c98779 /include/core/SkPaint.h
parent93df05afa45a51715db60aa88cc6ea11f232b3ea (diff)
parent7cd90d4eecdba0f40a36945749d40df95d6d641b (diff)
downloadexternal_skia-a0a3a4d3f7e368311d896eaca0a22732a81d37fb.zip
external_skia-a0a3a4d3f7e368311d896eaca0a22732a81d37fb.tar.gz
external_skia-a0a3a4d3f7e368311d896eaca0a22732a81d37fb.tar.bz2
Merge branch 'jb-mr1-release' of https://android.googlesource.com/platform/external/skia into mr1-staging
Change-Id: I5cf0639d6ad25f58af4d5e0e480ee063148991f8
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r--include/core/SkPaint.h39
1 files changed, 32 insertions, 7 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 30ff663..d2233f0 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -10,11 +10,16 @@
#ifndef SkPaint_DEFINED
#define SkPaint_DEFINED
+#include "SkTypes.h"
#include "SkColor.h"
#include "SkDrawLooper.h"
#include "SkXfermode.h"
#include "SkString.h"
+#ifdef SK_BUILD_FOR_ANDROID
+#include "SkLanguage.h"
+#endif
+
class SkAutoGlyphCache;
class SkColorFilter;
class SkDescriptor;
@@ -656,15 +661,34 @@ public:
void setTextAlign(Align align);
#ifdef SK_BUILD_FOR_ANDROID
- /** Return the paint's text locale value.
- @return the paint's text locale value used for drawing text.
+ /** Return the paint's language value used for drawing text.
+ @return the paint's language value used for drawing text.
*/
- const SkString& getTextLocale() const { return fTextLocale; }
+ const SkLanguage& getLanguage() const { return fLanguage; }
+
+ /** Set the paint's language value used for drawing text.
+ @param language set the paint's language value for drawing text.
+ */
+ void setLanguage(const SkLanguage& language);
+
+
+ enum FontVariant {
+ kDefault_Variant, // Currently setting yourself to Default gives you Compact Variant
+ kCompact_Variant,
+ kElegant_Variant,
+ kLast_Variant = kElegant_Variant,
+ };
+
+ /** Return the font variant
+ @return the font variant used by this paint object
+ */
+ FontVariant getFontVariant() const { return fFontVariant; }
+
- /** Set the paint's text locale.
- @param locale set the paint's locale value for drawing text.
+ /** Set the font variant
+ @param fontVariant set the paint's font variant for choosing fonts
*/
- void setTextLocale(const SkString& locale);
+ void setFontVariant(FontVariant fontVariant);
#endif
/** Return the paint's text size.
@@ -905,7 +929,8 @@ private:
unsigned fTextEncoding : 2; // 3 values
unsigned fHinting : 2;
#ifdef SK_BUILD_FOR_ANDROID
- SkString fTextLocale;
+ SkLanguage fLanguage;
+ FontVariant fFontVariant;
#endif
SkDrawCacheProc getDrawCacheProc() const;