aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2010-01-08 09:10:38 -0500
committerMike Reed <reed@google.com>2010-01-08 09:10:38 -0500
commit2cf237c941bf5964f654d0ccdd639a26468e1d71 (patch)
tree770d08b5a25853775714fdaa11639cdf4a53aed7 /include
parent091f227385b467090b5a7169a8e2faf19eca7105 (diff)
downloadexternal_skia-2cf237c941bf5964f654d0ccdd639a26468e1d71.zip
external_skia-2cf237c941bf5964f654d0ccdd639a26468e1d71.tar.gz
external_skia-2cf237c941bf5964f654d0ccdd639a26468e1d71.tar.bz2
refresh from skia/trunk, adds paint bit for bitmapfonts
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPaint.h16
-rw-r--r--include/core/SkScalerContext.h5
2 files changed, 19 insertions, 2 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 01b0811..86f174a 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -109,10 +109,11 @@ public:
kSubpixelText_Flag = 0x80, //!< mask to enable subpixel text positioning
kDevKernText_Flag = 0x100, //!< mask to enable device kerning text
kLCDRenderText_Flag = 0x200, //!< mask to enable subpixel glyph renderering
+ kEmbeddedBitmapText_Flag = 0x400, //!< mask to enable embedded bitmap strikes
// when adding extra flags, note that the fFlags member is specified
// with a bit-width and you'll have to expand it.
- kAllFlags = 0x3FF
+ kAllFlags = 0x7FF
};
/** Return the paint's flags. Use the Flag enum to test flag values.
@@ -190,6 +191,17 @@ public:
*/
void setLCDRenderText(bool subpixelRender);
+ bool isEmbeddedBitmapText() const
+ {
+ return SkToBool(this->getFlags() & kEmbeddedBitmapText_Flag);
+ }
+
+ /** Helper for setFlags(), setting or clearing the kEmbeddedBitmapText_Flag bit
+ @param useEmbeddedBitmapText true to set the kEmbeddedBitmapText bit in the paint's flags,
+ false to clear it.
+ */
+ void setEmbeddedBitmapText(bool useEmbeddedBitmapText);
+
/** Helper for getFlags(), returning true if kUnderlineText_Flag bit is set
@return true if the underlineText bit is set in the paint's flags.
*/
@@ -802,7 +814,7 @@ private:
SkColor fColor;
SkScalar fWidth;
SkScalar fMiterLimit;
- unsigned fFlags : 10;
+ unsigned fFlags : 11;
unsigned fTextAlign : 2;
unsigned fCapType : 2;
unsigned fJoinType : 2;
diff --git a/include/core/SkScalerContext.h b/include/core/SkScalerContext.h
index 83bd0e7..6aae316 100644
--- a/include/core/SkScalerContext.h
+++ b/include/core/SkScalerContext.h
@@ -154,6 +154,7 @@ public:
// up with the SkPaint::Hinting enum.
kHintingBit1_Flag = 0x10,
kHintingBit2_Flag = 0x20,
+ kEmbeddedBitmapText_Flag = 0x40,
};
private:
enum {
@@ -169,6 +170,10 @@ public:
uint8_t fMaskFormat;
uint8_t fStrokeJoin;
uint8_t fFlags;
+ // Warning: when adding members note that the size of this structure
+ // must be a multiple of 4. SkDescriptor requires that its arguments be
+ // multiples of four and this structure is put in an SkDescriptor in
+ // SkPaint::MakeRec.
void getMatrixFrom2x2(SkMatrix*) const;
void getLocalMatrix(SkMatrix*) const;