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 17 matching lines...) Expand all Loading... |
28 virtual uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; | 28 virtual uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; |
29 virtual void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; | 29 virtual void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; |
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 | 37 |
| 38 void getBoundingBox(SkGlyph* glyph, |
| 39 DWRITE_RENDERING_MODE renderingMode, |
| 40 DWRITE_TEXTURE_TYPE textureType, |
| 41 RECT* bbox); |
| 42 |
38 SkTDArray<uint8_t> fBits; | 43 SkTDArray<uint8_t> fBits; |
39 /** The total matrix without the text height scale. */ | 44 /** The total matrix without the text height scale. */ |
40 SkMatrix fSkXform; | 45 SkMatrix fSkXform; |
41 /** The total matrix without the text height scale. */ | 46 /** The total matrix without the text height scale. */ |
42 DWRITE_MATRIX fXform; | 47 DWRITE_MATRIX fXform; |
43 /** The non-rotational part of total matrix without the text height scale. | 48 /** The non-rotational part of total matrix without the text height scale. |
44 * This is used to find the magnitude of gdi compatible advances. | 49 * This is used to find the magnitude of gdi compatible advances. |
45 */ | 50 */ |
46 DWRITE_MATRIX fGsA; | 51 DWRITE_MATRIX fGsA; |
47 /** The inverse of the rotational part of the total matrix. | 52 /** The inverse of the rotational part of the total matrix. |
48 * This is used to find the direction of gdi compatible advances. | 53 * This is used to find the direction of gdi compatible advances. |
49 */ | 54 */ |
50 SkMatrix fG_inv; | 55 SkMatrix fG_inv; |
51 /** The text size to render with. */ | 56 /** The text size to render with. */ |
52 SkScalar fTextSizeRender; | 57 SkScalar fTextSizeRender; |
53 /** The text size to measure with. */ | 58 /** The text size to measure with. */ |
54 SkScalar fTextSizeMeasure; | 59 SkScalar fTextSizeMeasure; |
55 SkAutoTUnref<DWriteFontTypeface> fTypeface; | 60 SkAutoTUnref<DWriteFontTypeface> fTypeface; |
56 int fGlyphCount; | 61 int fGlyphCount; |
57 DWRITE_RENDERING_MODE fRenderingMode; | 62 DWRITE_RENDERING_MODE fRenderingMode; |
58 DWRITE_TEXTURE_TYPE fTextureType; | 63 DWRITE_TEXTURE_TYPE fTextureType; |
59 DWRITE_MEASURING_MODE fMeasuringMode; | 64 DWRITE_MEASURING_MODE fMeasuringMode; |
60 }; | 65 }; |
61 | 66 |
62 #endif | 67 #endif |
OLD | NEW |