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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 | 202 |
203 /** | 203 /** |
204 * The default impl. will create a bitmap-shader from the bitmap, | 204 * The default impl. will create a bitmap-shader from the bitmap, |
205 * and call drawRect with it. | 205 * and call drawRect with it. |
206 */ | 206 */ |
207 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, | 207 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, |
208 const SkRect* srcOrNull, const SkRect& dst, | 208 const SkRect* srcOrNull, const SkRect& dst, |
209 const SkPaint& paint, | 209 const SkPaint& paint, |
210 SkCanvas::DrawBitmapRectFlags flags) = 0; | 210 SkCanvas::DrawBitmapRectFlags flags) = 0; |
211 | 211 |
212 virtual void drawImage(const SkDraw&, const SkImage*, SkScalar x, SkScalar y , const SkPaint&); | |
bsalomon
2015/05/04 15:08:07
override?
reed1
2015/05/04 15:11:21
This is the base-class, introducing these methods.
| |
213 virtual void drawImageRect(const SkDraw&, const SkImage*, const SkRect* src, const SkRect& dst, | |
214 const SkPaint&); | |
215 | |
212 /** | 216 /** |
213 * Does not handle text decoration. | 217 * Does not handle text decoration. |
214 * Decorations (underline and stike-thru) will be handled by SkCanvas. | 218 * Decorations (underline and stike-thru) will be handled by SkCanvas. |
215 */ | 219 */ |
216 virtual void drawText(const SkDraw&, const void* text, size_t len, | 220 virtual void drawText(const SkDraw&, const void* text, size_t len, |
217 SkScalar x, SkScalar y, const SkPaint& paint) = 0; | 221 SkScalar x, SkScalar y, const SkPaint& paint) = 0; |
218 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 222 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
219 const SkScalar pos[], int scalarsPerPos, | 223 const SkScalar pos[], int scalarsPerPos, |
220 const SkPoint& offset, const SkPaint& paint) = 0; | 224 const SkPoint& offset, const SkPaint& paint) = 0; |
221 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou nt, | 225 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou nt, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
396 SkDeviceProperties* fLeakyProperties; // will always exist. | 400 SkDeviceProperties* fLeakyProperties; // will always exist. |
397 | 401 |
398 #ifdef SK_DEBUG | 402 #ifdef SK_DEBUG |
399 bool fAttachedToCanvas; | 403 bool fAttachedToCanvas; |
400 #endif | 404 #endif |
401 | 405 |
402 typedef SkRefCnt INHERITED; | 406 typedef SkRefCnt INHERITED; |
403 }; | 407 }; |
404 | 408 |
405 #endif | 409 #endif |
OLD | NEW |