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 "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 if (scalarsPerPos != 2) { | 611 if (scalarsPerPos != 2) { |
612 yStr.appendScalar(offset.y()); | 612 yStr.appendScalar(offset.y()); |
613 } | 613 } |
614 | 614 |
615 elem.addAttribute("x", xStr); | 615 elem.addAttribute("x", xStr); |
616 elem.addAttribute("y", yStr); | 616 elem.addAttribute("y", yStr); |
617 elem.addText(svg_text(text, len, paint)); | 617 elem.addText(svg_text(text, len, paint)); |
618 } | 618 } |
619 | 619 |
620 void SkSVGDevice::drawTextOnPath(const SkDraw&, const void* text, size_t len, co
nst SkPath& path, | 620 void SkSVGDevice::drawTextOnPath(const SkDraw&, const void* text, size_t len, co
nst SkPath& path, |
621 const SkMatrix* matrix, const SkPaint& paint) { | 621 const SkMatrix* matrix, SK_SUPPORT_LEGACY_DRAWT
EXTONPATH_PARAM |
| 622 const SkPaint& paint) { |
622 SkString pathID = fResourceBucket->addPath(); | 623 SkString pathID = fResourceBucket->addPath(); |
623 | 624 |
624 { | 625 { |
625 AutoElement defs("defs", fWriter); | 626 AutoElement defs("defs", fWriter); |
626 AutoElement pathElement("path", fWriter); | 627 AutoElement pathElement("path", fWriter); |
627 pathElement.addAttribute("id", pathID); | 628 pathElement.addAttribute("id", pathID); |
628 pathElement.addPathAttributes(path); | 629 pathElement.addPathAttributes(path); |
629 | 630 |
630 } | 631 } |
631 | 632 |
(...skipping 28 matching lines...) Expand all Loading... |
660 const SkPaint& paint) { | 661 const SkPaint& paint) { |
661 // todo | 662 // todo |
662 SkDebugf("unsupported operation: drawVertices()\n"); | 663 SkDebugf("unsupported operation: drawVertices()\n"); |
663 } | 664 } |
664 | 665 |
665 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 666 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
666 const SkPaint&) { | 667 const SkPaint&) { |
667 // todo | 668 // todo |
668 SkDebugf("unsupported operation: drawDevice()\n"); | 669 SkDebugf("unsupported operation: drawDevice()\n"); |
669 } | 670 } |
OLD | NEW |