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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGPathElement.cpp

Issue 1408143004: Use PathSegmentData+SVGPath{Consumer,Source} in PathSVGInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: InterpolatedPathSource Created 5 years, 1 month 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 (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 visitor->trace(m_pathLength); 85 visitor->trace(m_pathLength);
86 visitor->trace(m_pathSegList); 86 visitor->trace(m_pathSegList);
87 SVGGeometryElement::trace(visitor); 87 SVGGeometryElement::trace(visitor);
88 } 88 }
89 89
90 DEFINE_NODE_FACTORY(SVGPathElement) 90 DEFINE_NODE_FACTORY(SVGPathElement)
91 91
92 Path SVGPathElement::asPath() const 92 Path SVGPathElement::asPath() const
93 { 93 {
94 Path path; 94 Path path;
95 buildPathFromByteStream(*pathByteStream(), path); 95 buildPathFromByteStream(pathByteStream(), path);
96 return path; 96 return path;
97 } 97 }
98 98
99 float SVGPathElement::getTotalLength() 99 float SVGPathElement::getTotalLength()
100 { 100 {
101 return getTotalLengthOfSVGPathByteStream(*pathByteStream()); 101 return getTotalLengthOfSVGPathByteStream(pathByteStream());
102 } 102 }
103 103
104 PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPathElement::getPointAtLength(float l ength) 104 PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPathElement::getPointAtLength(float l ength)
105 { 105 {
106 FloatPoint point = getPointAtLengthOfSVGPathByteStream(*pathByteStream(), le ngth); 106 FloatPoint point = getPointAtLengthOfSVGPathByteStream(pathByteStream(), len gth);
107 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim Val); 107 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim Val);
108 } 108 }
109 109
110 unsigned SVGPathElement::getPathSegAtLength(float length) 110 unsigned SVGPathElement::getPathSegAtLength(float length)
111 { 111 {
112 return getSVGPathSegAtLengthFromSVGPathByteStream(*pathByteStream(), length) ; 112 return getSVGPathSegAtLengthFromSVGPathByteStream(pathByteStream(), length);
113 } 113 }
114 114
115 PassRefPtrWillBeRawPtr<SVGPathSegClosePath> SVGPathElement::createSVGPathSegClos ePath() 115 PassRefPtrWillBeRawPtr<SVGPathSegClosePath> SVGPathElement::createSVGPathSegClos ePath()
116 { 116 {
117 return SVGPathSegClosePath::create(0); 117 return SVGPathSegClosePath::create(0);
118 } 118 }
119 119
120 PassRefPtrWillBeRawPtr<SVGPathSegMovetoAbs> SVGPathElement::createSVGPathSegMove toAbs(float x, float y) 120 PassRefPtrWillBeRawPtr<SVGPathSegMovetoAbs> SVGPathElement::createSVGPathSegMove toAbs(float x, float y)
121 { 121 {
122 return SVGPathSegMovetoAbs::create(0, x, y); 122 return SVGPathSegMovetoAbs::create(0, x, y);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 SVGElement::InvalidationGuard invalidationGuard(this); 264 SVGElement::InvalidationGuard invalidationGuard(this);
265 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject()); 265 LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject());
266 if (!layoutObject) 266 if (!layoutObject)
267 return; 267 return;
268 268
269 layoutObject->setNeedsShapeUpdate(); 269 layoutObject->setNeedsShapeUpdate();
270 markForLayoutAndParentResourceInvalidation(layoutObject); 270 markForLayoutAndParentResourceInvalidation(layoutObject);
271 } 271 }
272 272
273 } // namespace blink 273 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathElement.h ('k') | third_party/WebKit/Source/core/svg/SVGPathSeg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698