OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 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 SkDevice_DEFINED | 8 #ifndef SkDevice_DEFINED |
9 #define SkDevice_DEFINED | 9 #define SkDevice_DEFINED |
10 | 10 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 * Does not handle text decoration. | 213 * Does not handle text decoration. |
214 * Decorations (underline and stike-thru) will be handled by SkCanvas. | 214 * Decorations (underline and stike-thru) will be handled by SkCanvas. |
215 */ | 215 */ |
216 virtual void drawText(const SkDraw&, const void* text, size_t len, | 216 virtual void drawText(const SkDraw&, const void* text, size_t len, |
217 SkScalar x, SkScalar y, const SkPaint& paint) = 0; | 217 SkScalar x, SkScalar y, const SkPaint& paint) = 0; |
218 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 218 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
219 const SkScalar pos[], int scalarsPerPos, | 219 const SkScalar pos[], int scalarsPerPos, |
220 const SkPoint& offset, const SkPaint& paint) = 0; | 220 const SkPoint& offset, const SkPaint& paint) = 0; |
221 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, | 221 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
222 const SkPath& path, const SkMatrix* matrix, | 222 const SkPath& path, const SkMatrix* matrix, |
| 223 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM |
223 const SkPaint& paint) = 0; | 224 const SkPaint& paint) = 0; |
224 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 225 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
225 const SkPoint verts[], const SkPoint texs[], | 226 const SkPoint verts[], const SkPoint texs[], |
226 const SkColor colors[], SkXfermode* xmode, | 227 const SkColor colors[], SkXfermode* xmode, |
227 const uint16_t indices[], int indexCount, | 228 const uint16_t indices[], int indexCount, |
228 const SkPaint& paint) = 0; | 229 const SkPaint& paint) = 0; |
229 // default implementation unrolls the blob runs. | 230 // default implementation unrolls the blob runs. |
230 virtual void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkSc
alar y, | 231 virtual void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkSc
alar y, |
231 const SkPaint& paint); | 232 const SkPaint& paint); |
232 // default implementation calls drawVertices | 233 // default implementation calls drawVertices |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 SkDeviceProperties* fLeakyProperties; // will always exist. | 391 SkDeviceProperties* fLeakyProperties; // will always exist. |
391 | 392 |
392 #ifdef SK_DEBUG | 393 #ifdef SK_DEBUG |
393 bool fAttachedToCanvas; | 394 bool fAttachedToCanvas; |
394 #endif | 395 #endif |
395 | 396 |
396 typedef SkRefCnt INHERITED; | 397 typedef SkRefCnt INHERITED; |
397 }; | 398 }; |
398 | 399 |
399 #endif | 400 #endif |
OLD | NEW |