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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 | 723 |
724 SkDraw adjustedDraw(draw); | 724 SkDraw adjustedDraw(draw); |
725 adjustedDraw.fMatrix = &adjustedMatrix; | 725 adjustedDraw.fMatrix = &adjustedMatrix; |
726 | 726 |
727 SkClipStack adjustedClipStack; | 727 SkClipStack adjustedClipStack; |
728 if (srcOrNull && *srcOrNull != SkRect::Make(bm.bounds())) { | 728 if (srcOrNull && *srcOrNull != SkRect::Make(bm.bounds())) { |
729 SkRect devClipRect; | 729 SkRect devClipRect; |
730 draw.fMatrix->mapRect(&devClipRect, dst); | 730 draw.fMatrix->mapRect(&devClipRect, dst); |
731 | 731 |
732 adjustedClipStack = *draw.fClipStack; | 732 adjustedClipStack = *draw.fClipStack; |
733 adjustedClipStack.clipDevRect(devClipRect, SkRegion::kIntersect_Op, pain
t.isAntiAlias()); | 733 adjustedClipStack.clipDevRect(devClipRect, SkCanvas::kIntersect_Op, pain
t.isAntiAlias()); |
734 adjustedDraw.fClipStack = &adjustedClipStack; | 734 adjustedDraw.fClipStack = &adjustedClipStack; |
735 } | 735 } |
736 | 736 |
737 drawBitmapCommon(adjustedDraw, bm, paint); | 737 drawBitmapCommon(adjustedDraw, bm, paint); |
738 } | 738 } |
739 | 739 |
740 void SkSVGDevice::drawText(const SkDraw& draw, const void* text, size_t len, | 740 void SkSVGDevice::drawText(const SkDraw& draw, const void* text, size_t len, |
741 SkScalar x, SkScalar y, const SkPaint& paint) { | 741 SkScalar x, SkScalar y, const SkPaint& paint) { |
742 AutoElement elem("text", fWriter, fResourceBucket, draw, paint); | 742 AutoElement elem("text", fWriter, fResourceBucket, draw, paint); |
743 elem.addTextAttributes(paint); | 743 elem.addTextAttributes(paint); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 const SkPaint& paint) { | 806 const SkPaint& paint) { |
807 // todo | 807 // todo |
808 SkDebugf("unsupported operation: drawVertices()\n"); | 808 SkDebugf("unsupported operation: drawVertices()\n"); |
809 } | 809 } |
810 | 810 |
811 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 811 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
812 const SkPaint&) { | 812 const SkPaint&) { |
813 // todo | 813 // todo |
814 SkDebugf("unsupported operation: drawDevice()\n"); | 814 SkDebugf("unsupported operation: drawDevice()\n"); |
815 } | 815 } |
OLD | NEW |