diff options
author | agl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-01-04 18:27:55 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-01-04 18:27:55 +0000 |
commit | e95c91e6d9201d50d0b84fbc3d2f53f92f753e0b (patch) | |
tree | 44689f5d69a8ccfb0794653d02db0b9ce89a1615 /include/core | |
parent | 030d8e68e2478b783ecf089265b3d4ec8c3be2f8 (diff) |
Add flag to enable bitmap strikes.
http://codereview.appspot.com/183096
git-svn-id: http://skia.googlecode.com/svn/trunk@466 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkPaint.h | 16 | ||||
-rw-r--r-- | include/core/SkScalerContext.h | 1 |
2 files changed, 15 insertions, 2 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 659d8753e7..9f174fc460 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. */ @@ -795,7 +807,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 29c28f7ea2..05d25086f7 100644 --- a/include/core/SkScalerContext.h +++ b/include/core/SkScalerContext.h @@ -166,6 +166,7 @@ public: SkScalar fPost2x2[2][2]; SkScalar fFrameWidth, fMiterLimit; bool fSubpixelPositioning; + bool fUseEmbeddedBitmapText; uint8_t fMaskFormat; uint8_t fStrokeJoin; uint8_t fFlags; |