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 found
in the LICENSE file. | 4 * Use of this source code is governed by a BSD-style license that can be found
in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef SkGlyphCache_DEFINED | 7 #ifndef SkGlyphCache_DEFINED |
8 #define SkGlyphCache_DEFINED | 8 #define SkGlyphCache_DEFINED |
9 | 9 |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 unsigned getGlyphCount() const; | 70 unsigned getGlyphCount() const; |
71 | 71 |
72 /** Return the number of glyphs currently cached. */ | 72 /** Return the number of glyphs currently cached. */ |
73 int countCachedGlyphs() const; | 73 int countCachedGlyphs() const; |
74 | 74 |
75 /** Return the image associated with the glyph. If it has not been generated
this will | 75 /** Return the image associated with the glyph. If it has not been generated
this will |
76 trigger that. | 76 trigger that. |
77 */ | 77 */ |
78 const void* findImage(const SkGlyph&); | 78 const void* findImage(const SkGlyph&); |
79 | 79 |
| 80 /** If the advance axis intersects the glyph's path, append the positions sc
aled and offset |
| 81 to the array (if non-null), and set the count to the updated array lengt
h. |
| 82 */ |
| 83 void findIntercepts(const SkScalar bounds[2], SkScalar scale, SkScalar xPos, |
| 84 bool yAxis, SkGlyph* , SkScalar* array, int* count); |
| 85 |
80 /** Return the Path associated with the glyph. If it has not been generated
this will trigger | 86 /** Return the Path associated with the glyph. If it has not been generated
this will trigger |
81 that. | 87 that. |
82 */ | 88 */ |
83 const SkPath* findPath(const SkGlyph&); | 89 const SkPath* findPath(const SkGlyph&); |
84 | 90 |
85 /** Return the vertical metrics for this strike. | 91 /** Return the vertical metrics for this strike. |
86 */ | 92 */ |
87 const SkPaint::FontMetrics& getFontMetrics() const { | 93 const SkPaint::FontMetrics& getFontMetrics() const { |
88 return fFontMetrics; | 94 return fFontMetrics; |
89 } | 95 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 const SkMatrix* matrix) { | 321 const SkMatrix* matrix) { |
316 fCache = paint.detachCache(surfaceProps, matrix, true); | 322 fCache = paint.detachCache(surfaceProps, matrix, true); |
317 } | 323 } |
318 | 324 |
319 private: | 325 private: |
320 SkAutoGlyphCacheNoGamma() : SkAutoGlyphCacheBase() {} | 326 SkAutoGlyphCacheNoGamma() : SkAutoGlyphCacheBase() {} |
321 }; | 327 }; |
322 #define SkAutoGlyphCacheNoGamma(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCacheNoGamm
a) | 328 #define SkAutoGlyphCacheNoGamma(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCacheNoGamm
a) |
323 | 329 |
324 #endif | 330 #endif |
OLD | NEW |