Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: src/utils/SkNWayCanvas.cpp

Issue 600643002: Override drawImage*() in SkNWayCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Correcting nit Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 void SkNWayCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 220 void SkNWayCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
221 const SkRect& dst, const SkPaint* paint) { 221 const SkRect& dst, const SkPaint* paint) {
222 Iter iter(fList); 222 Iter iter(fList);
223 while (iter.next()) { 223 while (iter.next()) {
224 iter->drawBitmapNine(bitmap, center, dst, paint); 224 iter->drawBitmapNine(bitmap, center, dst, paint);
225 } 225 }
226 } 226 }
227 227
228 void SkNWayCanvas::drawImage(const SkImage* image, SkScalar left, SkScalar top,
229 const SkPaint* paint) {
230 Iter iter(fList);
231 while (iter.next()) {
232 iter->drawImage(image, left, top, paint);
233 }
234 }
235
236 void SkNWayCanvas::drawImageRect(const SkImage* image, const SkRect* src,
237 const SkRect& dst,
238 const SkPaint* paint) {
239 Iter iter(fList);
240 while (iter.next()) {
241 iter->drawImageRect(image, src, dst, paint);
242 }
243 }
244
228 void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y, 245 void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
229 const SkPaint* paint) { 246 const SkPaint* paint) {
230 Iter iter(fList); 247 Iter iter(fList);
231 while (iter.next()) { 248 while (iter.next()) {
232 iter->drawSprite(bitmap, x, y, paint); 249 iter->drawSprite(bitmap, x, y, paint);
233 } 250 }
234 } 251 }
235 252
236 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y, 253 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y,
237 const SkPaint& paint) { 254 const SkPaint& paint) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 iter->addComment(kywd, value); 347 iter->addComment(kywd, value);
331 } 348 }
332 } 349 }
333 350
334 void SkNWayCanvas::endCommentGroup() { 351 void SkNWayCanvas::endCommentGroup() {
335 Iter iter(fList); 352 Iter iter(fList);
336 while (iter.next()) { 353 while (iter.next()) {
337 iter->endCommentGroup(); 354 iter->endCommentGroup();
338 } 355 }
339 } 356 }
OLDNEW
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698