23 #ifndef SVGGradientElement_h
24 #define SVGGradientElement_h
34 class SVGGradientElement;
35 class SVGTransformList;
37 class SVGGradientElement :
public SVGStyledElement,
38 public SVGURIReference,
39 public SVGExternalResourcesRequired {
41 enum SVGGradientType {
42 SVG_SPREADMETHOD_UNKNOWN = 0,
43 SVG_SPREADMETHOD_PAD = 1,
44 SVG_SPREADMETHOD_REFLECT = 2,
45 SVG_SPREADMETHOD_REPEAT = 3
48 SVGGradientElement(
const QualifiedName&, Document*);
49 virtual ~SVGGradientElement();
51 virtual void parseMappedAttribute(MappedAttribute*);
52 virtual void svgAttributeChanged(
const QualifiedName&);
54 using DOM::NodeImpl::childrenChanged;
55 virtual void childrenChanged(
bool changedByParser =
false, Node* beforeChange = 0, Node* afterChange = 0,
int childCountDelta = 0);
56 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
58 virtual SVGResource* canvasResource();
61 friend class SVGPaintServerGradient;
62 friend class SVGLinearGradientElement;
63 friend class SVGRadialGradientElement;
65 virtual void buildGradient()
const = 0;
66 virtual SVGPaintServerType gradientType()
const = 0;
68 Vector<SVGGradientStop> buildStops()
const;
69 mutable RefPtr<SVGPaintServerGradient> m_resource;
72 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference,
String, Href, href)
73 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired,
bool, ExternalResourcesRequired, externalResourcesRequired)
75 ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement,
int,
int, SpreadMethod, spreadMethod)
76 ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement,
int,
int, GradientUnits, gradientUnits)
77 ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, SVGTransformList*, RefPtr<SVGTransformList>, GradientTransform, gradientTransform)