Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: src/svg/SkSVGDevice.cpp

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add guard for android Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698