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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 */ | 291 */ |
292 virtual uint16_t generateCharToGlyph(SkUnichar unichar) = 0; | 292 virtual uint16_t generateCharToGlyph(SkUnichar unichar) = 0; |
293 | 293 |
294 /** Returns the unichar for the given glyph id. | 294 /** Returns the unichar for the given glyph id. |
295 * If there is no 1:1 mapping from the glyph id to a unichar, returns 0. | 295 * If there is no 1:1 mapping from the glyph id to a unichar, returns 0. |
296 * The default implementation always returns 0, indicating failure. | 296 * The default implementation always returns 0, indicating failure. |
297 */ | 297 */ |
298 virtual SkUnichar generateGlyphToChar(uint16_t glyphId); | 298 virtual SkUnichar generateGlyphToChar(uint16_t glyphId); |
299 | 299 |
300 void forceGenerateImageFromPath() { fGenerateImageFromPath = true; } | 300 void forceGenerateImageFromPath() { fGenerateImageFromPath = true; } |
| 301 void forceOffGenerateImageFromPath() { fGenerateImageFromPath = false; } |
301 | 302 |
302 private: | 303 private: |
303 // never null | 304 // never null |
304 SkAutoTUnref<SkTypeface> fTypeface; | 305 SkAutoTUnref<SkTypeface> fTypeface; |
305 | 306 |
306 // optional object, which may be null | 307 // optional object, which may be null |
307 SkPathEffect* fPathEffect; | 308 SkPathEffect* fPathEffect; |
308 SkMaskFilter* fMaskFilter; | 309 SkMaskFilter* fMaskFilter; |
309 SkRasterizer* fRasterizer; | 310 SkRasterizer* fRasterizer; |
310 | 311 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 return static_cast<SkPaint::Hinting>(hint); | 360 return static_cast<SkPaint::Hinting>(hint); |
360 } | 361 } |
361 | 362 |
362 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 363 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
363 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 364 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
364 (hinting << SkScalerContext::kHinting_Shift); | 365 (hinting << SkScalerContext::kHinting_Shift); |
365 } | 366 } |
366 | 367 |
367 | 368 |
368 #endif | 369 #endif |
OLD | NEW |