OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 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 SkDevice_DEFINED | 10 #ifndef SkDevice_DEFINED |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 * Decorations (underline and stike-thru) will be handled by SkCanvas. | 260 * Decorations (underline and stike-thru) will be handled by SkCanvas. |
261 */ | 261 */ |
262 virtual void drawText(const SkDraw&, const void* text, size_t len, | 262 virtual void drawText(const SkDraw&, const void* text, size_t len, |
263 SkScalar x, SkScalar y, const SkPaint& paint) = 0; | 263 SkScalar x, SkScalar y, const SkPaint& paint) = 0; |
264 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 264 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
265 const SkScalar pos[], SkScalar constY, | 265 const SkScalar pos[], SkScalar constY, |
266 int scalarsPerPos, const SkPaint& paint) = 0; | 266 int scalarsPerPos, const SkPaint& paint) = 0; |
267 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, | 267 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
268 const SkPath& path, const SkMatrix* matrix, | 268 const SkPath& path, const SkMatrix* matrix, |
269 const SkPaint& paint) = 0; | 269 const SkPaint& paint) = 0; |
270 #ifdef SK_BUILD_FOR_ANDROID | |
271 virtual void drawPosTextOnPath(const SkDraw& draw, const void* text, size_t
len, | |
272 const SkPoint pos[], const SkPaint& paint, | |
273 const SkPath& path, const SkMatrix* matrix) =
0; | |
274 #endif | |
275 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 270 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
276 const SkPoint verts[], const SkPoint texs[], | 271 const SkPoint verts[], const SkPoint texs[], |
277 const SkColor colors[], SkXfermode* xmode, | 272 const SkColor colors[], SkXfermode* xmode, |
278 const uint16_t indices[], int indexCount, | 273 const uint16_t indices[], int indexCount, |
279 const SkPaint& paint) = 0; | 274 const SkPaint& paint) = 0; |
280 /** The SkDevice passed will be an SkDevice which was returned by a call to | 275 /** The SkDevice passed will be an SkDevice which was returned by a call to |
281 onCreateCompatibleDevice on this device with kSaveLayer_Usage. | 276 onCreateCompatibleDevice on this device with kSaveLayer_Usage. |
282 */ | 277 */ |
283 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 278 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
284 const SkPaint&) = 0; | 279 const SkPaint&) = 0; |
285 | 280 |
| 281 // DEPRECATED -- will remove this once the subclass stop overriding it |
| 282 virtual void drawPosTextOnPath(const SkDraw&, const void* text, size_t len, |
| 283 const SkPoint pos[], const SkPaint&, |
| 284 const SkPath&, const SkMatrix*) {} |
| 285 |
286 /** | 286 /** |
287 * On success (returns true), copy the device pixels into the bitmap. | 287 * On success (returns true), copy the device pixels into the bitmap. |
288 * On failure, the bitmap parameter is left unchanged and false is | 288 * On failure, the bitmap parameter is left unchanged and false is |
289 * returned. | 289 * returned. |
290 * | 290 * |
291 * The device's pixels are converted to the bitmap's config. The only | 291 * The device's pixels are converted to the bitmap's config. The only |
292 * supported config is kARGB_8888_Config, though this is likely to be | 292 * supported config is kARGB_8888_Config, though this is likely to be |
293 * relaxed in the future. The meaning of config kARGB_8888_Config is | 293 * relaxed in the future. The meaning of config kARGB_8888_Config is |
294 * modified by the enum param config8888. The default value interprets | 294 * modified by the enum param config8888. The default value interprets |
295 * kARGB_8888_Config as SkPMColor | 295 * kARGB_8888_Config as SkPMColor |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 SkDeviceProperties fLeakyProperties; | 415 SkDeviceProperties fLeakyProperties; |
416 | 416 |
417 #ifdef SK_DEBUG | 417 #ifdef SK_DEBUG |
418 bool fAttachedToCanvas; | 418 bool fAttachedToCanvas; |
419 #endif | 419 #endif |
420 | 420 |
421 typedef SkRefCnt INHERITED; | 421 typedef SkRefCnt INHERITED; |
422 }; | 422 }; |
423 | 423 |
424 #endif | 424 #endif |
OLD | NEW |