OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
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 #ifndef SkBitmapDevice_DEFINED | 9 #ifndef SkBitmapDevice_DEFINED |
10 #define SkBitmapDevice_DEFINED | 10 #define SkBitmapDevice_DEFINED |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool pathIsMutable = false) override; | 74 bool pathIsMutable = false) override; |
75 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, | 75 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, |
76 const SkMatrix& matrix, const SkPaint& paint) overri
de; | 76 const SkMatrix& matrix, const SkPaint& paint) overri
de; |
77 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, | 77 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, |
78 int x, int y, const SkPaint& paint) override; | 78 int x, int y, const SkPaint& paint) override; |
79 | 79 |
80 /** | 80 /** |
81 * The default impl. will create a bitmap-shader from the bitmap, | 81 * The default impl. will create a bitmap-shader from the bitmap, |
82 * and call drawRect with it. | 82 * and call drawRect with it. |
83 */ | 83 */ |
84 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, | 84 void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect*, const SkR
ect&, |
85 const SkRect* srcOrNull, const SkRect& dst, | 85 const SkPaint&, SK_VIRTUAL_CONSTRAINT_TYPE) override; |
86 const SkPaint& paint, | |
87 SkCanvas::DrawBitmapRectFlags flags) override; | |
88 | 86 |
89 /** | 87 /** |
90 * Does not handle text decoration. | 88 * Does not handle text decoration. |
91 * Decorations (underline and stike-thru) will be handled by SkCanvas. | 89 * Decorations (underline and stike-thru) will be handled by SkCanvas. |
92 */ | 90 */ |
93 virtual void drawText(const SkDraw&, const void* text, size_t len, | 91 virtual void drawText(const SkDraw&, const void* text, size_t len, |
94 SkScalar x, SkScalar y, const SkPaint& paint) override
; | 92 SkScalar x, SkScalar y, const SkPaint& paint) override
; |
95 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 93 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
96 const SkScalar pos[], int scalarsPerPos, | 94 const SkScalar pos[], int scalarsPerPos, |
97 const SkPoint& offset, const SkPaint& paint) overri
de; | 95 const SkPoint& offset, const SkPaint& paint) overri
de; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 SkImageFilter::Cache* getImageFilterCache() override; | 144 SkImageFilter::Cache* getImageFilterCache() override; |
147 | 145 |
148 SkBitmap fBitmap; | 146 SkBitmap fBitmap; |
149 | 147 |
150 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). | 148 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). |
151 | 149 |
152 typedef SkBaseDevice INHERITED; | 150 typedef SkBaseDevice INHERITED; |
153 }; | 151 }; |
154 | 152 |
155 #endif // SkBitmapDevice_DEFINED | 153 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |