aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-02-17 09:28:22 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-17 17:31:33 +0000
commita01bf9ab748836fc4bf271bd5024151bf1ce2e88 (patch)
treee6bc9c8d04411af11b0f52aecc4cfa0ce8307945 /include
parent04628221324eb2e5b329a8fd9c69196ea9acb43c (diff)
hide deprecated underline and strikethru
BUG=skia:6250 Change-Id: I85395e4960b16ab91237a74ff35e5b7588965512 Reviewed-on: https://skia-review.googlesource.com/8600 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPaint.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 7a42238319..f4b6db98c8 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -101,8 +101,6 @@ public:
enum Flags {
kAntiAlias_Flag = 0x01, //!< mask to enable antialiasing
kDither_Flag = 0x04, //!< mask to enable dithering
- kUnderlineText_Flag = 0x08, //!< mask to enable underline text
- kStrikeThruText_Flag = 0x10, //!< mask to enable strike-thru text
kFakeBoldText_Flag = 0x20, //!< mask to enable fake-bold text
kLinearText_Flag = 0x40, //!< mask to enable linear-text
kSubpixelText_Flag = 0x80, //!< mask to enable subpixel text positioning
@@ -115,7 +113,12 @@ public:
// when adding extra flags, note that the fFlags member is specified
// with a bit-width and you'll have to expand it.
- kAllFlags = 0xFFFF
+ kAllFlags = 0xFFFF,
+
+#ifdef SK_SUPPORT_LEGACY_PAINT_TEXTDECORATION
+ kUnderlineText_Flag = 0x08,
+ kStrikeThruText_Flag = 0x10,
+#endif
};
/** Return the paint's flags. Use the Flag enum to test flag values.
@@ -229,28 +232,16 @@ public:
/** Helper for getFlags(), returning true if kUnderlineText_Flag bit is set
@return true if the underlineText bit is set in the paint's flags.
*/
- bool isUnderlineText() const {
- return SkToBool(this->getFlags() & kUnderlineText_Flag);
- }
-
- /** Helper for setFlags(), setting or clearing the kUnderlineText_Flag bit
- @param underlineText true to set the underlineText bit in the paint's
- flags, false to clear it.
- */
- void setUnderlineText(bool underlineText);
+#ifdef SK_SUPPORT_LEGACY_PAINT_TEXTDECORATION
+ bool isUnderlineText() const { return false; }
+#endif
/** Helper for getFlags(), returns true if kStrikeThruText_Flag bit is set
@return true if the strikeThruText bit is set in the paint's flags.
*/
- bool isStrikeThruText() const {
- return SkToBool(this->getFlags() & kStrikeThruText_Flag);
- }
-
- /** Helper for setFlags(), setting or clearing the kStrikeThruText_Flag bit
- @param strikeThruText true to set the strikeThruText bit in the
- paint's flags, false to clear it.
- */
- void setStrikeThruText(bool strikeThruText);
+#ifdef SK_SUPPORT_LEGACY_PAINT_TEXTDECORATION
+ bool isStrikeThruText() const { return false; }
+#endif
/** Helper for getFlags(), returns true if kFakeBoldText_Flag bit is set
@return true if the kFakeBoldText_Flag bit is set in the paint's flags.