OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
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 SkScalarContext_win_dw_DEFINED | 8 #ifndef SkScalarContext_win_dw_DEFINED |
9 #define SkScalarContext_win_dw_DEFINED | 9 #define SkScalarContext_win_dw_DEFINED |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 virtual void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; | 30 virtual void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; |
31 virtual void generateImage(const SkGlyph& glyph) SK_OVERRIDE; | 31 virtual void generateImage(const SkGlyph& glyph) SK_OVERRIDE; |
32 virtual void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; | 32 virtual void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; |
33 virtual void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; | 33 virtual void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; |
34 | 34 |
35 private: | 35 private: |
36 const void* drawDWMask(const SkGlyph& glyph, | 36 const void* drawDWMask(const SkGlyph& glyph, |
37 DWRITE_RENDERING_MODE renderingMode, | 37 DWRITE_RENDERING_MODE renderingMode, |
38 DWRITE_TEXTURE_TYPE textureType); | 38 DWRITE_TEXTURE_TYPE textureType); |
39 | 39 |
40 void getBoundingBox(SkGlyph* glyph, | 40 HRESULT getBoundingBox(SkGlyph* glyph, |
41 DWRITE_RENDERING_MODE renderingMode, | 41 DWRITE_RENDERING_MODE renderingMode, |
42 DWRITE_TEXTURE_TYPE textureType, | 42 DWRITE_TEXTURE_TYPE textureType, |
43 RECT* bbox); | 43 RECT* bbox); |
44 | 44 |
45 SkTDArray<uint8_t> fBits; | 45 SkTDArray<uint8_t> fBits; |
46 /** The total matrix without the text height scale. */ | 46 /** The total matrix without the text height scale. */ |
47 SkMatrix fSkXform; | 47 SkMatrix fSkXform; |
48 /** The total matrix without the text height scale. */ | 48 /** The total matrix without the text height scale. */ |
49 DWRITE_MATRIX fXform; | 49 DWRITE_MATRIX fXform; |
50 /** The non-rotational part of total matrix without the text height scale. | 50 /** The non-rotational part of total matrix without the text height scale. |
51 * This is used to find the magnitude of gdi compatible advances. | 51 * This is used to find the magnitude of gdi compatible advances. |
52 */ | 52 */ |
53 DWRITE_MATRIX fGsA; | 53 DWRITE_MATRIX fGsA; |
54 /** The inverse of the rotational part of the total matrix. | 54 /** The inverse of the rotational part of the total matrix. |
55 * This is used to find the direction of gdi compatible advances. | 55 * This is used to find the direction of gdi compatible advances. |
56 */ | 56 */ |
57 SkMatrix fG_inv; | 57 SkMatrix fG_inv; |
58 /** The text size to render with. */ | 58 /** The text size to render with. */ |
59 SkScalar fTextSizeRender; | 59 SkScalar fTextSizeRender; |
60 /** The text size to measure with. */ | 60 /** The text size to measure with. */ |
61 SkScalar fTextSizeMeasure; | 61 SkScalar fTextSizeMeasure; |
62 SkAutoTUnref<DWriteFontTypeface> fTypeface; | 62 SkAutoTUnref<DWriteFontTypeface> fTypeface; |
63 int fGlyphCount; | 63 int fGlyphCount; |
64 DWRITE_RENDERING_MODE fRenderingMode; | 64 DWRITE_RENDERING_MODE fRenderingMode; |
65 DWRITE_TEXTURE_TYPE fTextureType; | 65 DWRITE_TEXTURE_TYPE fTextureType; |
66 DWRITE_MEASURING_MODE fMeasuringMode; | 66 DWRITE_MEASURING_MODE fMeasuringMode; |
67 }; | 67 }; |
68 | 68 |
69 #endif | 69 #endif |
OLD | NEW |