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 SkScalerContext_DEFINED | 8 #ifndef SkScalerContext_DEFINED |
9 #define SkScalerContext_DEFINED | 9 #define SkScalerContext_DEFINED |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 class SkScalerContext { | 115 class SkScalerContext { |
116 public: | 116 public: |
117 typedef SkScalerContextRec Rec; | 117 typedef SkScalerContextRec Rec; |
118 | 118 |
119 enum Flags { | 119 enum Flags { |
120 kFrameAndFill_Flag = 0x0001, | 120 kFrameAndFill_Flag = 0x0001, |
121 kDevKernText_Flag = 0x0002, | 121 kDevKernText_Flag = 0x0002, |
122 kEmbeddedBitmapText_Flag = 0x0004, | 122 kEmbeddedBitmapText_Flag = 0x0004, |
123 kEmbolden_Flag = 0x0008, | 123 kEmbolden_Flag = 0x0008, |
124 kSubpixelPositioning_Flag = 0x0010, | 124 kSubpixelPositioning_Flag = 0x0010, |
125 kAutohinting_Flag = 0x0020, | 125 kForceAutohinting_Flag = 0x0020, // Use auto instead of bytcode hint
ing if hinting. |
126 kVertical_Flag = 0x0040, | 126 kVertical_Flag = 0x0040, |
127 | 127 |
128 // together, these two flags resulting in a two bit value which matches | 128 // together, these two flags resulting in a two bit value which matches |
129 // up with the SkPaint::Hinting enum. | 129 // up with the SkPaint::Hinting enum. |
130 kHinting_Shift = 7, // to shift into the other flags above | 130 kHinting_Shift = 7, // to shift into the other flags above |
131 kHintingBit1_Flag = 0x0080, | 131 kHintingBit1_Flag = 0x0080, |
132 kHintingBit2_Flag = 0x0100, | 132 kHintingBit2_Flag = 0x0100, |
133 | 133 |
134 // Pixel geometry information. | 134 // Pixel geometry information. |
135 // only meaningful if fMaskFormat is LCD16 or LCD32 | 135 // only meaningful if fMaskFormat is LCD16 or LCD32 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 return static_cast<SkPaint::Hinting>(hint); | 337 return static_cast<SkPaint::Hinting>(hint); |
338 } | 338 } |
339 | 339 |
340 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 340 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
341 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 341 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
342 (hinting << SkScalerContext::kHinting_Shift); | 342 (hinting << SkScalerContext::kHinting_Shift); |
343 } | 343 } |
344 | 344 |
345 | 345 |
346 #endif | 346 #endif |
OLD | NEW |