| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 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 #include "SkLatticeIter.h" | 8 #include "SkLatticeIter.h" |
| 9 #include "SkPDFCanvas.h" | 9 #include "SkPDFCanvas.h" |
| 10 #include "SkPDFDevice.h" | 10 #include "SkPDFDevice.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 this->concat(SkMatrix::MakeRectToRect(src, dst, | 83 this->concat(SkMatrix::MakeRectToRect(src, dst, |
| 84 SkMatrix::kFill_ScaleToFit)); | 84 SkMatrix::kFill_ScaleToFit)); |
| 85 this->drawBitmap(bitmap, 0, 0, paint); | 85 this->drawBitmap(bitmap, 0, 0, paint); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void SkPDFCanvas::onDrawImageLattice(const SkImage* image, | 88 void SkPDFCanvas::onDrawImageLattice(const SkImage* image, |
| 89 const Lattice& lattice, | 89 const Lattice& lattice, |
| 90 const SkRect& dst, | 90 const SkRect& dst, |
| 91 const SkPaint* paint) { | 91 const SkPaint* paint) { |
| 92 SkLatticeIter iter(image->width(), image->height(), lattice, dst); | 92 SkLatticeIter iter(lattice, dst); |
| 93 SkRect srcR, dstR; | 93 SkRect srcR, dstR; |
| 94 while (iter.next(&srcR, &dstR)) { | 94 while (iter.next(&srcR, &dstR)) { |
| 95 this->drawImageRect(image, srcR, dstR, paint); | 95 this->drawImageRect(image, srcR, dstR, paint); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 void SkPDFCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, | 99 void SkPDFCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, |
| 100 const Lattice& lattice, | 100 const Lattice& lattice, |
| 101 const SkRect& dst, | 101 const SkRect& dst, |
| 102 const SkPaint* paint) { | 102 const SkPaint* paint) { |
| 103 SkLatticeIter iter(bitmap.width(), bitmap.height(), lattice, dst); | 103 SkLatticeIter iter(lattice, dst); |
| 104 SkRect srcR, dstR; | 104 SkRect srcR, dstR; |
| 105 while (iter.next(&srcR, &dstR)) { | 105 while (iter.next(&srcR, &dstR)) { |
| 106 this->drawBitmapRect(bitmap, srcR, dstR, paint); | 106 this->drawBitmapRect(bitmap, srcR, dstR, paint); |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 | 109 |
| OLD | NEW |