| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkCanvas_DEFINED | 10 #ifndef SkCanvas_DEFINED |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 @param byteLength The number of bytes to read from the text parameter | 804 @param byteLength The number of bytes to read from the text parameter |
| 805 @param path The path the text should follow for its baseline | 805 @param path The path the text should follow for its baseline |
| 806 @param matrix (may be null) Applied to the text before it is | 806 @param matrix (may be null) Applied to the text before it is |
| 807 mapped onto the path | 807 mapped onto the path |
| 808 @param paint The paint used for the text | 808 @param paint The paint used for the text |
| 809 */ | 809 */ |
| 810 virtual void drawTextOnPath(const void* text, size_t byteLength, | 810 virtual void drawTextOnPath(const void* text, size_t byteLength, |
| 811 const SkPath& path, const SkMatrix* matrix, | 811 const SkPath& path, const SkMatrix* matrix, |
| 812 const SkPaint& paint); | 812 const SkPaint& paint); |
| 813 | 813 |
| 814 #ifdef SK_BUILD_FOR_ANDROID | |
| 815 /** Draw the text on path, with each character/glyph origin specified by the
pos[] | |
| 816 array. The origin is interpreted by the Align setting in the paint. | |
| 817 @param text The text to be drawn | |
| 818 @param byteLength The number of bytes to read from the text parameter | |
| 819 @param pos Array of positions, used to position each character | |
| 820 @param paint The paint used for the text (e.g. color, size, style) | |
| 821 @param path The path to draw on | |
| 822 @param matrix The canvas matrix | |
| 823 */ | |
| 824 void drawPosTextOnPath(const void* text, size_t byteLength, | |
| 825 const SkPoint pos[], const SkPaint& paint, | |
| 826 const SkPath& path, const SkMatrix* matrix); | |
| 827 #endif | |
| 828 | |
| 829 /** Draw the picture into this canvas. This method effective brackets the | 814 /** Draw the picture into this canvas. This method effective brackets the |
| 830 playback of the picture's draw calls with save/restore, so the state | 815 playback of the picture's draw calls with save/restore, so the state |
| 831 of this canvas will be unchanged after this call. | 816 of this canvas will be unchanged after this call. |
| 832 @param picture The recorded drawing commands to playback into this | 817 @param picture The recorded drawing commands to playback into this |
| 833 canvas. | 818 canvas. |
| 834 */ | 819 */ |
| 835 virtual void drawPicture(SkPicture& picture); | 820 virtual void drawPicture(SkPicture& picture); |
| 836 | 821 |
| 837 enum VertexMode { | 822 enum VertexMode { |
| 838 kTriangles_VertexMode, | 823 kTriangles_VertexMode, |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 if (NULL != fCanvas) { | 1174 if (NULL != fCanvas) { |
| 1190 fCanvas->endCommentGroup(); | 1175 fCanvas->endCommentGroup(); |
| 1191 } | 1176 } |
| 1192 } | 1177 } |
| 1193 | 1178 |
| 1194 private: | 1179 private: |
| 1195 SkCanvas* fCanvas; | 1180 SkCanvas* fCanvas; |
| 1196 }; | 1181 }; |
| 1197 | 1182 |
| 1198 #endif | 1183 #endif |
| OLD | NEW |