| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkPaint_DEFINED | 8 #ifndef SkPaint_DEFINED |
| 9 #define SkPaint_DEFINED | 9 #define SkPaint_DEFINED |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 kStrikeThruText_Flag = 0x10, //!< mask to enable strike-thru text | 109 kStrikeThruText_Flag = 0x10, //!< mask to enable strike-thru text |
| 110 kFakeBoldText_Flag = 0x20, //!< mask to enable fake-bold text | 110 kFakeBoldText_Flag = 0x20, //!< mask to enable fake-bold text |
| 111 kLinearText_Flag = 0x40, //!< mask to enable linear-text | 111 kLinearText_Flag = 0x40, //!< mask to enable linear-text |
| 112 kSubpixelText_Flag = 0x80, //!< mask to enable subpixel text positi
oning | 112 kSubpixelText_Flag = 0x80, //!< mask to enable subpixel text positi
oning |
| 113 kDevKernText_Flag = 0x100, //!< mask to enable device kerning text | 113 kDevKernText_Flag = 0x100, //!< mask to enable device kerning text |
| 114 kLCDRenderText_Flag = 0x200, //!< mask to enable subpixel glyph rende
rering | 114 kLCDRenderText_Flag = 0x200, //!< mask to enable subpixel glyph rende
rering |
| 115 kEmbeddedBitmapText_Flag = 0x400, //!< mask to enable embedded bitmap st
rikes | 115 kEmbeddedBitmapText_Flag = 0x400, //!< mask to enable embedded bitmap st
rikes |
| 116 kAutoHinting_Flag = 0x800, //!< mask to force Freetype's autohinter | 116 kAutoHinting_Flag = 0x800, //!< mask to force Freetype's autohinter |
| 117 kVerticalText_Flag = 0x1000, | 117 kVerticalText_Flag = 0x1000, |
| 118 kGenA8FromLCD_Flag = 0x2000, // hack for GDI -- do not use if you can
help it | 118 kGenA8FromLCD_Flag = 0x2000, // hack for GDI -- do not use if you can
help it |
| 119 kDistanceFieldTextTEMP_Flag = 0x4000, //!< TEMPORARY mask to enable dist
ance fields | |
| 120 // currently overrides LCD and sub
pixel rendering | |
| 121 // when adding extra flags, note that the fFlags member is specified | 119 // when adding extra flags, note that the fFlags member is specified |
| 122 // with a bit-width and you'll have to expand it. | 120 // with a bit-width and you'll have to expand it. |
| 123 | 121 |
| 124 kAllFlags = 0xFFFF | 122 kAllFlags = 0xFFFF |
| 125 }; | 123 }; |
| 126 | 124 |
| 127 /** Return the paint's flags. Use the Flag enum to test flag values. | 125 /** Return the paint's flags. Use the Flag enum to test flag values. |
| 128 @return the paint's flags (see enums ending in _Flag for bit masks) | 126 @return the paint's flags (see enums ending in _Flag for bit masks) |
| 129 */ | 127 */ |
| 130 uint32_t getFlags() const { return fBitfields.fFlags; } | 128 uint32_t getFlags() const { return fBitfields.fFlags; } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 bool isDevKernText() const { | 275 bool isDevKernText() const { |
| 278 return SkToBool(this->getFlags() & kDevKernText_Flag); | 276 return SkToBool(this->getFlags() & kDevKernText_Flag); |
| 279 } | 277 } |
| 280 | 278 |
| 281 /** Helper for setFlags(), setting or clearing the kKernText_Flag bit | 279 /** Helper for setFlags(), setting or clearing the kKernText_Flag bit |
| 282 @param kernText true to set the kKernText_Flag bit in the paint's | 280 @param kernText true to set the kKernText_Flag bit in the paint's |
| 283 flags, false to clear it. | 281 flags, false to clear it. |
| 284 */ | 282 */ |
| 285 void setDevKernText(bool devKernText); | 283 void setDevKernText(bool devKernText); |
| 286 | 284 |
| 287 /** Helper for getFlags(), returns true if kDistanceFieldTextTEMP_Flag bit i
s set | |
| 288 @return true if the distanceFieldText bit is set in the paint's flags. | |
| 289 */ | |
| 290 bool isDistanceFieldTextTEMP() const { | |
| 291 return SkToBool(this->getFlags() & kDistanceFieldTextTEMP_Flag); | |
| 292 } | |
| 293 | |
| 294 /** Helper for setFlags(), setting or clearing the kDistanceFieldTextTEMP_Fl
ag bit | |
| 295 @param distanceFieldText true to set the kDistanceFieldTextTEMP_Flag bit in
the paint's | |
| 296 flags, false to clear it. | |
| 297 */ | |
| 298 void setDistanceFieldTextTEMP(bool distanceFieldText); | |
| 299 | |
| 300 #ifdef SK_SUPPORT_LEGACY_FILTERLEVEL_ENUM | 285 #ifdef SK_SUPPORT_LEGACY_FILTERLEVEL_ENUM |
| 301 enum FilterLevel { | 286 enum FilterLevel { |
| 302 kNone_FilterLevel = kNone_SkFilterQuality, | 287 kNone_FilterLevel = kNone_SkFilterQuality, |
| 303 kLow_FilterLevel = kLow_SkFilterQuality, | 288 kLow_FilterLevel = kLow_SkFilterQuality, |
| 304 kMedium_FilterLevel = kMedium_SkFilterQuality, | 289 kMedium_FilterLevel = kMedium_SkFilterQuality, |
| 305 kHigh_FilterLevel = kHigh_SkFilterQuality | 290 kHigh_FilterLevel = kHigh_SkFilterQuality |
| 306 }; | 291 }; |
| 307 | 292 |
| 308 /** | 293 /** |
| 309 * Return the filter level. This affects the quality (and performance) of | 294 * Return the filter level. This affects the quality (and performance) of |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 friend class GrStencilAndCoverTextContext; | 1120 friend class GrStencilAndCoverTextContext; |
| 1136 friend class GrPathRendering; | 1121 friend class GrPathRendering; |
| 1137 friend class GrTextContext; | 1122 friend class GrTextContext; |
| 1138 friend class GrGLPathRendering; | 1123 friend class GrGLPathRendering; |
| 1139 friend class SkScalerContext; | 1124 friend class SkScalerContext; |
| 1140 friend class SkTextToPathIter; | 1125 friend class SkTextToPathIter; |
| 1141 friend class SkCanonicalizePaint; | 1126 friend class SkCanonicalizePaint; |
| 1142 }; | 1127 }; |
| 1143 | 1128 |
| 1144 #endif | 1129 #endif |
| OLD | NEW |