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 |
11 #include "SkMask.h" | 11 #include "SkMask.h" |
12 #include "SkMaskGamma.h" | 12 #include "SkMaskGamma.h" |
13 #include "SkMatrix.h" | 13 #include "SkMatrix.h" |
14 #include "SkPaint.h" | 14 #include "SkPaint.h" |
15 #include "SkTypeface.h" | 15 #include "SkTypeface.h" |
16 | 16 |
17 struct SkGlyph; | 17 struct SkGlyph; |
18 class SkDescriptor; | 18 class SkDescriptor; |
19 class SkMaskFilter; | 19 class SkMaskFilter; |
20 class SkPathEffect; | 20 class SkPathEffect; |
21 class SkRasterizer; | 21 class SkRasterizer; |
22 | 22 |
23 /* | 23 /* |
24 * To allow this to be forward-declared, it must be its own typename, rather | 24 * To allow this to be forward-declared, it must be its own typename, rather |
25 * than a nested struct inside SkScalerContext (where it started). | 25 * than a nested struct inside SkScalerContext (where it started). |
26 */ | 26 */ |
27 struct SkScalerContextRec { | 27 struct SkScalerContextRec { |
28 uint32_t fOrigFontID; | |
29 uint32_t fFontID; | 28 uint32_t fFontID; |
30 SkScalar fTextSize, fPreScaleX, fPreSkewX; | 29 SkScalar fTextSize, fPreScaleX, fPreSkewX; |
31 SkScalar fPost2x2[2][2]; | 30 SkScalar fPost2x2[2][2]; |
32 SkScalar fFrameWidth, fMiterLimit; | 31 SkScalar fFrameWidth, fMiterLimit; |
33 | 32 |
34 //These describe the parameters to create (uniquely identify) the pre-blend. | 33 //These describe the parameters to create (uniquely identify) the pre-blend. |
35 uint32_t fLumBits; | 34 uint32_t fLumBits; |
36 uint8_t fDeviceGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB | 35 uint8_t fDeviceGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB |
37 uint8_t fPaintGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB | 36 uint8_t fPaintGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB |
38 uint8_t fContrast; //0.8+1, [0.0, 1.0] artificial contrast | 37 uint8_t fContrast; //0.8+1, [0.0, 1.0] artificial contrast |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 return static_cast<SkPaint::Hinting>(hint); | 313 return static_cast<SkPaint::Hinting>(hint); |
315 } | 314 } |
316 | 315 |
317 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 316 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
318 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 317 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
319 (hinting << SkScalerContext::kHinting_Shift); | 318 (hinting << SkScalerContext::kHinting_Shift); |
320 } | 319 } |
321 | 320 |
322 | 321 |
323 #endif | 322 #endif |
OLD | NEW |