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 26 matching lines...) Expand all Loading... |
37 DEFINE_ANIMATED_BOOLEAN(SVGCircleElement, SVGNames::externalResourcesRequiredAtt
r, ExternalResourcesRequired, externalResourcesRequired) | 37 DEFINE_ANIMATED_BOOLEAN(SVGCircleElement, SVGNames::externalResourcesRequiredAtt
r, ExternalResourcesRequired, externalResourcesRequired) |
38 | 38 |
39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCircleElement) | 39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCircleElement) |
40 REGISTER_LOCAL_ANIMATED_PROPERTY(cx) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(cx) |
41 REGISTER_LOCAL_ANIMATED_PROPERTY(cy) | 41 REGISTER_LOCAL_ANIMATED_PROPERTY(cy) |
42 REGISTER_LOCAL_ANIMATED_PROPERTY(r) | 42 REGISTER_LOCAL_ANIMATED_PROPERTY(r) |
43 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 43 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
45 END_REGISTER_ANIMATED_PROPERTIES | 45 END_REGISTER_ANIMATED_PROPERTIES |
46 | 46 |
47 inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document
& document) | 47 inline SVGCircleElement::SVGCircleElement(Document& document) |
48 : SVGGeometryElement(tagName, document) | 48 : SVGGeometryElement(SVGNames::circleTag, document) |
49 , m_cx(LengthModeWidth) | 49 , m_cx(LengthModeWidth) |
50 , m_cy(LengthModeHeight) | 50 , m_cy(LengthModeHeight) |
51 , m_r(LengthModeOther) | 51 , m_r(LengthModeOther) |
52 { | 52 { |
53 ASSERT(hasTagName(SVGNames::circleTag)); | |
54 ScriptWrappable::init(this); | 53 ScriptWrappable::init(this); |
55 registerAnimatedPropertiesForSVGCircleElement(); | 54 registerAnimatedPropertiesForSVGCircleElement(); |
56 } | 55 } |
57 | 56 |
58 PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagNa
me, Document& document) | 57 PassRefPtr<SVGCircleElement> SVGCircleElement::create(Document& document) |
59 { | 58 { |
60 return adoptRef(new SVGCircleElement(tagName, document)); | 59 return adoptRef(new SVGCircleElement(document)); |
61 } | 60 } |
62 | 61 |
63 bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName) | 62 bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName) |
64 { | 63 { |
65 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 64 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
66 if (supportedAttributes.isEmpty()) { | 65 if (supportedAttributes.isEmpty()) { |
67 SVGLangSpace::addSupportedAttributes(supportedAttributes); | 66 SVGLangSpace::addSupportedAttributes(supportedAttributes); |
68 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 67 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
69 supportedAttributes.add(SVGNames::cxAttr); | 68 supportedAttributes.add(SVGNames::cxAttr); |
70 supportedAttributes.add(SVGNames::cyAttr); | 69 supportedAttributes.add(SVGNames::cyAttr); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 || cyCurrentValue().isRelative() | 132 || cyCurrentValue().isRelative() |
134 || rCurrentValue().isRelative(); | 133 || rCurrentValue().isRelative(); |
135 } | 134 } |
136 | 135 |
137 RenderObject* SVGCircleElement::createRenderer(RenderStyle*) | 136 RenderObject* SVGCircleElement::createRenderer(RenderStyle*) |
138 { | 137 { |
139 return new RenderSVGEllipse(this); | 138 return new RenderSVGEllipse(this); |
140 } | 139 } |
141 | 140 |
142 } | 141 } |
OLD | NEW |