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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 visitor->trace(m_pathLength); | 62 visitor->trace(m_pathLength); |
63 visitor->trace(m_pathSegList); | 63 visitor->trace(m_pathSegList); |
64 SVGGeometryElement::trace(visitor); | 64 SVGGeometryElement::trace(visitor); |
65 } | 65 } |
66 | 66 |
67 DEFINE_NODE_FACTORY(SVGPathElement) | 67 DEFINE_NODE_FACTORY(SVGPathElement) |
68 | 68 |
69 float SVGPathElement::getTotalLength() | 69 float SVGPathElement::getTotalLength() |
70 { | 70 { |
71 float totalLength = 0; | 71 float totalLength = 0; |
72 getTotalLengthOfSVGPathByteStream(pathByteStream(), totalLength); | 72 getTotalLengthOfSVGPathByteStream(*pathByteStream(), totalLength); |
73 return totalLength; | 73 return totalLength; |
74 } | 74 } |
75 | 75 |
76 PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPathElement::getPointAtLength(float l
ength) | 76 PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPathElement::getPointAtLength(float l
ength) |
77 { | 77 { |
78 FloatPoint point; | 78 FloatPoint point; |
79 getPointAtLengthOfSVGPathByteStream(pathByteStream(), length, point); | 79 getPointAtLengthOfSVGPathByteStream(*pathByteStream(), length, point); |
80 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim
Val); | 80 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim
Val); |
81 } | 81 } |
82 | 82 |
83 unsigned SVGPathElement::getPathSegAtLength(float length) | 83 unsigned SVGPathElement::getPathSegAtLength(float length) |
84 { | 84 { |
85 unsigned pathSeg = 0; | 85 unsigned pathSeg = 0; |
86 getSVGPathSegAtLengthFromSVGPathByteStream(pathByteStream(), length, pathSeg
); | 86 getSVGPathSegAtLengthFromSVGPathByteStream(*pathByteStream(), length, pathSe
g); |
87 return pathSeg; | 87 return pathSeg; |
88 } | 88 } |
89 | 89 |
90 PassRefPtrWillBeRawPtr<SVGPathSegClosePath> SVGPathElement::createSVGPathSegClos
ePath() | 90 PassRefPtrWillBeRawPtr<SVGPathSegClosePath> SVGPathElement::createSVGPathSegClos
ePath() |
91 { | 91 { |
92 return SVGPathSegClosePath::create(0); | 92 return SVGPathSegClosePath::create(0); |
93 } | 93 } |
94 | 94 |
95 PassRefPtrWillBeRawPtr<SVGPathSegMovetoAbs> SVGPathElement::createSVGPathSegMove
toAbs(float x, float y) | 95 PassRefPtrWillBeRawPtr<SVGPathSegMovetoAbs> SVGPathElement::createSVGPathSegMove
toAbs(float x, float y) |
96 { | 96 { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 285 |
286 // FIXME: Eventually we should support getBBox for detached elements. | 286 // FIXME: Eventually we should support getBBox for detached elements. |
287 if (!renderer()) | 287 if (!renderer()) |
288 return FloatRect(); | 288 return FloatRect(); |
289 | 289 |
290 RenderSVGShape* renderer = toRenderSVGShape(this->renderer()); | 290 RenderSVGShape* renderer = toRenderSVGShape(this->renderer()); |
291 return renderer->path().boundingRect(); | 291 return renderer->path().boundingRect(); |
292 } | 292 } |
293 | 293 |
294 } // namespace blink | 294 } // namespace blink |
OLD | NEW |