OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 static PassRefPtr<SVGMarkerElement> create(Document&); | 114 static PassRefPtr<SVGMarkerElement> create(Document&); |
115 | 115 |
116 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; | 116 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; |
117 | 117 |
118 void setOrientToAuto(); | 118 void setOrientToAuto(); |
119 void setOrientToAngle(const SVGAngle&); | 119 void setOrientToAngle(const SVGAngle&); |
120 | 120 |
121 static const SVGPropertyInfo* orientTypePropertyInfo(); | 121 static const SVGPropertyInfo* orientTypePropertyInfo(); |
122 | 122 |
| 123 SVGAnimatedLength* refX() const { return m_refX.get(); } |
| 124 SVGAnimatedLength* refY() const { return m_refY.get(); } |
| 125 SVGAnimatedLength* markerWidth() const { return m_markerWidth.get(); } |
| 126 SVGAnimatedLength* markerHeight() const { return m_markerHeight.get(); } |
| 127 |
123 // Custom 'orientType' property. | 128 // Custom 'orientType' property. |
124 static void synchronizeOrientType(SVGElement* contextElement); | 129 static void synchronizeOrientType(SVGElement* contextElement); |
125 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); | 130 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateOrientTypeWrapper(SVGEl
ement* contextElement); |
126 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } | 131 SVGMarkerOrientType& orientTypeCurrentValue() const { return m_orientType.va
lue; } |
127 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } | 132 SVGMarkerOrientType& orientTypeBaseValue() const { return m_orientType.value
; } |
128 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } | 133 void setOrientTypeBaseValue(const SVGMarkerOrientType& type) { m_orientType.
value = type; } |
129 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); | 134 PassRefPtr<SVGAnimatedEnumerationPropertyTearOff<SVGMarkerOrientType> > orie
ntType(); |
130 | 135 |
131 private: | 136 private: |
132 explicit SVGMarkerElement(Document&); | 137 explicit SVGMarkerElement(Document&); |
133 | 138 |
134 virtual bool needsPendingResourceHandling() const { return false; } | 139 virtual bool needsPendingResourceHandling() const { return false; } |
135 | 140 |
136 bool isSupportedAttribute(const QualifiedName&); | 141 bool isSupportedAttribute(const QualifiedName&); |
137 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 142 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
138 virtual void svgAttributeChanged(const QualifiedName&); | 143 virtual void svgAttributeChanged(const QualifiedName&); |
139 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 144 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); |
140 | 145 |
141 virtual RenderObject* createRenderer(RenderStyle*); | 146 virtual RenderObject* createRenderer(RenderStyle*); |
142 virtual bool rendererIsNeeded(const RenderStyle&) { return true; } | 147 virtual bool rendererIsNeeded(const RenderStyle&) { return true; } |
143 | 148 |
144 virtual bool selfHasRelativeLengths() const; | 149 virtual bool selfHasRelativeLengths() const; |
145 | 150 |
146 void synchronizeOrientType(); | 151 void synchronizeOrientType(); |
147 | 152 |
148 static const AtomicString& orientTypeIdentifier(); | 153 static const AtomicString& orientTypeIdentifier(); |
149 static const AtomicString& orientAngleIdentifier(); | 154 static const AtomicString& orientAngleIdentifier(); |
150 | 155 |
| 156 RefPtr<SVGAnimatedLength> m_refX; |
| 157 RefPtr<SVGAnimatedLength> m_refY; |
| 158 RefPtr<SVGAnimatedLength> m_markerWidth; |
| 159 RefPtr<SVGAnimatedLength> m_markerHeight; |
151 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; | 160 mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType; |
152 | |
153 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) | 161 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMarkerElement) |
154 DECLARE_ANIMATED_LENGTH(RefX, refX) | |
155 DECLARE_ANIMATED_LENGTH(RefY, refY) | |
156 DECLARE_ANIMATED_LENGTH(MarkerWidth, markerWidth) | |
157 DECLARE_ANIMATED_LENGTH(MarkerHeight, markerHeight) | |
158 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) | 162 DECLARE_ANIMATED_ENUMERATION(MarkerUnits, markerUnits, SVGMarkerUnitsTyp
e) |
159 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) | 163 DECLARE_ANIMATED_ANGLE(OrientAngle, orientAngle) |
160 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) | 164 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) |
161 DECLARE_ANIMATED_RECT(ViewBox, viewBox) | 165 DECLARE_ANIMATED_RECT(ViewBox, viewBox) |
162 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) | 166 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) |
163 END_DECLARE_ANIMATED_PROPERTIES | 167 END_DECLARE_ANIMATED_PROPERTIES |
164 }; | 168 }; |
165 | 169 |
166 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); | 170 DEFINE_NODE_TYPE_CASTS(SVGMarkerElement, hasTagName(SVGNames::markerTag)); |
167 | 171 |
168 } | 172 } |
169 | 173 |
170 #endif | 174 #endif |
OLD | NEW |