| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkSVGDevice.h" | 8 #include "SkSVGDevice.h" |
| 9 | 9 |
| 10 #include "SkBase64.h" | 10 #include "SkBase64.h" |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 SkMatrix adjustedMatrix = *draw.fMatrix; | 709 SkMatrix adjustedMatrix = *draw.fMatrix; |
| 710 adjustedMatrix.preTranslate(SkIntToScalar(x), SkIntToScalar(y)); | 710 adjustedMatrix.preTranslate(SkIntToScalar(x), SkIntToScalar(y)); |
| 711 SkDraw adjustedDraw(draw); | 711 SkDraw adjustedDraw(draw); |
| 712 adjustedDraw.fMatrix = &adjustedMatrix; | 712 adjustedDraw.fMatrix = &adjustedMatrix; |
| 713 | 713 |
| 714 drawBitmapCommon(adjustedDraw, bitmap, paint); | 714 drawBitmapCommon(adjustedDraw, bitmap, paint); |
| 715 } | 715 } |
| 716 | 716 |
| 717 void SkSVGDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bm, const S
kRect* srcOrNull, | 717 void SkSVGDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bm, const S
kRect* srcOrNull, |
| 718 const SkRect& dst, const SkPaint& paint, | 718 const SkRect& dst, const SkPaint& paint, |
| 719 SK_VIRTUAL_CONSTRAINT_TYPE) { | 719 SkCanvas::SrcRectConstraint) { |
| 720 SkMatrix adjustedMatrix; | 720 SkMatrix adjustedMatrix; |
| 721 adjustedMatrix.setRectToRect(srcOrNull ? *srcOrNull : SkRect::Make(bm.bounds
()), | 721 adjustedMatrix.setRectToRect(srcOrNull ? *srcOrNull : SkRect::Make(bm.bounds
()), |
| 722 dst, | 722 dst, |
| 723 SkMatrix::kFill_ScaleToFit); | 723 SkMatrix::kFill_ScaleToFit); |
| 724 adjustedMatrix.postConcat(*draw.fMatrix); | 724 adjustedMatrix.postConcat(*draw.fMatrix); |
| 725 | 725 |
| 726 SkDraw adjustedDraw(draw); | 726 SkDraw adjustedDraw(draw); |
| 727 adjustedDraw.fMatrix = &adjustedMatrix; | 727 adjustedDraw.fMatrix = &adjustedMatrix; |
| 728 | 728 |
| 729 SkClipStack adjustedClipStack; | 729 SkClipStack adjustedClipStack; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 const SkPaint& paint) { | 808 const SkPaint& paint) { |
| 809 // todo | 809 // todo |
| 810 SkDebugf("unsupported operation: drawVertices()\n"); | 810 SkDebugf("unsupported operation: drawVertices()\n"); |
| 811 } | 811 } |
| 812 | 812 |
| 813 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 813 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
| 814 const SkPaint&) { | 814 const SkPaint&) { |
| 815 // todo | 815 // todo |
| 816 SkDebugf("unsupported operation: drawDevice()\n"); | 816 SkDebugf("unsupported operation: drawDevice()\n"); |
| 817 } | 817 } |
| OLD | NEW |