diff options
Diffstat (limited to 'WebCore/svg/SVGPolylineElement.cpp')
-rw-r--r-- | WebCore/svg/SVGPolylineElement.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/WebCore/svg/SVGPolylineElement.cpp b/WebCore/svg/SVGPolylineElement.cpp index 7ec8431..c9750b2 100644 --- a/WebCore/svg/SVGPolylineElement.cpp +++ b/WebCore/svg/SVGPolylineElement.cpp @@ -37,21 +37,19 @@ PassRefPtr<SVGPolylineElement> SVGPolylineElement::create(const QualifiedName& t return adoptRef(new SVGPolylineElement(tagName, document)); } -Path SVGPolylineElement::toPathData() const +void SVGPolylineElement::toPathData(Path& path) const { - Path polyData; + ASSERT(path.isEmpty()); int len = points()->numberOfItems(); if (len < 1) - return polyData; + return; ExceptionCode ec = 0; - polyData.moveTo(points()->getItem(0, ec)); + path.moveTo(points()->getItem(0, ec)); for (int i = 1; i < len; ++i) - polyData.addLineTo(points()->getItem(i, ec)); - - return polyData; + path.addLineTo(points()->getItem(i, ec)); } } |