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 SkPaint_DEFINED | 8 #ifndef SkPaint_DEFINED |
9 #define SkPaint_DEFINED | 9 #define SkPaint_DEFINED |
10 | 10 |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 | 807 |
808 If the text encoding for the paint is kGlyph_TextEncoding, then this | 808 If the text encoding for the paint is kGlyph_TextEncoding, then this |
809 returns true if all of the specified glyph IDs are non-zero. | 809 returns true if all of the specified glyph IDs are non-zero. |
810 */ | 810 */ |
811 bool containsText(const void* text, size_t byteLength) const; | 811 bool containsText(const void* text, size_t byteLength) const; |
812 | 812 |
813 /** Convert the glyph array into Unichars. Unconvertable glyphs are mapped | 813 /** Convert the glyph array into Unichars. Unconvertable glyphs are mapped |
814 to zero. Note: this does not look at the text-encoding setting in the | 814 to zero. Note: this does not look at the text-encoding setting in the |
815 paint, only at the typeface. | 815 paint, only at the typeface. |
816 */ | 816 */ |
817 void glyphsToUnichars(const uint16_t glyphs[], int count, | 817 void glyphsToUnichars(const uint16_t glyphs[], int count, SkUnichar text[])
const; |
818 SkUnichar text[]) const; | |
819 | 818 |
820 /** Return the number of drawable units in the specified text buffer. | 819 /** Return the number of drawable units in the specified text buffer. |
821 This looks at the current TextEncoding field of the paint. If you also | 820 This looks at the current TextEncoding field of the paint. If you also |
822 want to have the text converted into glyph IDs, call textToGlyphs | 821 want to have the text converted into glyph IDs, call textToGlyphs |
823 instead. | 822 instead. |
824 */ | 823 */ |
825 int countText(const void* text, size_t byteLength) const { | 824 int countText(const void* text, size_t byteLength) const { |
826 return this->textToGlyphs(text, byteLength, NULL); | 825 return this->textToGlyphs(text, byteLength, NULL); |
827 } | 826 } |
828 | 827 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 friend class GrStencilAndCoverTextContext; | 1094 friend class GrStencilAndCoverTextContext; |
1096 friend class GrPathRendering; | 1095 friend class GrPathRendering; |
1097 friend class GrTextContext; | 1096 friend class GrTextContext; |
1098 friend class GrGLPathRendering; | 1097 friend class GrGLPathRendering; |
1099 friend class SkScalerContext; | 1098 friend class SkScalerContext; |
1100 friend class SkTextToPathIter; | 1099 friend class SkTextToPathIter; |
1101 friend class SkCanonicalizePaint; | 1100 friend class SkCanonicalizePaint; |
1102 }; | 1101 }; |
1103 | 1102 |
1104 #endif | 1103 #endif |
OLD | NEW |