OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "SkNWayCanvas.h" | 8 #include "SkNWayCanvas.h" |
9 | 9 |
10 SkNWayCanvas::SkNWayCanvas(int width, int height) | 10 SkNWayCanvas::SkNWayCanvas(int width, int height) |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 } | 217 } |
218 | 218 |
219 void SkNWayCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, cons
t SkRect& dst, | 219 void SkNWayCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, cons
t SkRect& dst, |
220 const SkPaint* paint, SrcRectConstraint const
raint) { | 220 const SkPaint* paint, SrcRectConstraint const
raint) { |
221 Iter iter(fList); | 221 Iter iter(fList); |
222 while (iter.next()) { | 222 while (iter.next()) { |
223 iter->legacy_drawImageRect(image, src, dst, paint, constraint); | 223 iter->legacy_drawImageRect(image, src, dst, paint, constraint); |
224 } | 224 } |
225 } | 225 } |
226 | 226 |
| 227 void SkNWayCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPa
int* paint) { |
| 228 Iter iter(fList); |
| 229 while (iter.next()) { |
| 230 iter->drawSprite(bitmap, x, y, paint); |
| 231 } |
| 232 } |
| 233 |
227 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S
kScalar y, | 234 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S
kScalar y, |
228 const SkPaint& paint) { | 235 const SkPaint& paint) { |
229 Iter iter(fList); | 236 Iter iter(fList); |
230 while (iter.next()) { | 237 while (iter.next()) { |
231 iter->drawText(text, byteLength, x, y, paint); | 238 iter->drawText(text, byteLength, x, y, paint); |
232 } | 239 } |
233 } | 240 } |
234 | 241 |
235 void SkNWayCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPo
int pos[], | 242 void SkNWayCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPo
int pos[], |
236 const SkPaint& paint) { | 243 const SkPaint& paint) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 } | 300 } |
294 } | 301 } |
295 | 302 |
296 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) { | 303 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) { |
297 Iter iter(fList); | 304 Iter iter(fList); |
298 while (iter.next()) { | 305 while (iter.next()) { |
299 iter->setDrawFilter(filter); | 306 iter->setDrawFilter(filter); |
300 } | 307 } |
301 return this->INHERITED::setDrawFilter(filter); | 308 return this->INHERITED::setDrawFilter(filter); |
302 } | 309 } |
OLD | NEW |