OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |