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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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(image->width(), image->height(), 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 | |
99 void SkPDFCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, | |
reed1
2016/08/16 11:28:47
General question for PDF canvas (not strictly rela
hal.canary
2016/08/16 14:57:33
No!
You need to keep the bitmaps until we get to
| |
100 const Lattice& lattice, | |
101 const SkRect& dst, | |
102 const SkPaint* paint) { | |
103 SkLatticeIter iter(bitmap.width(), bitmap.height(), lattice, dst); | |
104 SkRect srcR, dstR; | |
105 while (iter.next(&srcR, &dstR)) { | |
106 this->drawBitmapRect(bitmap, srcR, dstR, paint); | |
107 } | |
108 } | |
109 | |
OLD | NEW |