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(const QualifiedName& tagName, Document
& document) |
48 : SVGGraphicsElement(tagName, document) | 48 : SVGGraphicsElement(tagName, 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)); | 53 ASSERT(hasTagName(SVGNames::circleTag)); |
54 ScriptWrappable::init(this); | 54 ScriptWrappable::init(this); |
55 registerAnimatedPropertiesForSVGCircleElement(); | 55 registerAnimatedPropertiesForSVGCircleElement(); |
56 } | 56 } |
57 | 57 |
58 PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagNa
me, Document* document) | 58 PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagNa
me, Document& document) |
59 { | 59 { |
60 return adoptRef(new SVGCircleElement(tagName, document)); | 60 return adoptRef(new SVGCircleElement(tagName, document)); |
61 } | 61 } |
62 | 62 |
63 bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName) | 63 bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName) |
64 { | 64 { |
65 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 65 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
66 if (supportedAttributes.isEmpty()) { | 66 if (supportedAttributes.isEmpty()) { |
67 SVGLangSpace::addSupportedAttributes(supportedAttributes); | 67 SVGLangSpace::addSupportedAttributes(supportedAttributes); |
68 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 68 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 || cyCurrentValue().isRelative() | 133 || cyCurrentValue().isRelative() |
134 || rCurrentValue().isRelative(); | 134 || rCurrentValue().isRelative(); |
135 } | 135 } |
136 | 136 |
137 RenderObject* SVGCircleElement::createRenderer(RenderStyle*) | 137 RenderObject* SVGCircleElement::createRenderer(RenderStyle*) |
138 { | 138 { |
139 return new RenderSVGEllipse(this); | 139 return new RenderSVGEllipse(this); |
140 } | 140 } |
141 | 141 |
142 } | 142 } |
OLD | NEW |