SVGPatternElement.h [plain text]
#ifndef SVGPatternElement_h
#define SVGPatternElement_h
#if ENABLE(SVG)
#include "SVGPaintServerPattern.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFitToViewBox.h"
#include "SVGLangSpace.h"
#include "SVGStyledElement.h"
#include "SVGTests.h"
#include "SVGURIReference.h"
namespace WebCore {
struct PatternAttributes;
class SVGLength;
class SVGTransformList;
class SVGPatternElement : public SVGStyledElement,
public SVGURIReference,
public SVGTests,
public SVGLangSpace,
public SVGExternalResourcesRequired,
public SVGFitToViewBox {
public:
SVGPatternElement(const QualifiedName&, Document*);
virtual ~SVGPatternElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(MappedAttribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void childrenChanged(bool changedByParser = false);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual SVGResource* canvasResource();
protected:
ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, FloatRect, ViewBox, viewBox)
ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGLength, SVGLength, X, x)
ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGLength, SVGLength, Y, y)
ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGLength, SVGLength, Width, width)
ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGLength, SVGLength, Height, height)
ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, int, int, PatternUnits, patternUnits)
ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, int, int, PatternContentUnits, patternContentUnits)
ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGTransformList*, RefPtr<SVGTransformList>, PatternTransform, patternTransform)
mutable RefPtr<SVGPaintServerPattern> m_resource;
virtual const SVGElement* contextElement() const { return this; }
private:
friend class SVGPaintServerPattern;
void buildPattern(const FloatRect& targetRect) const;
PatternAttributes collectPatternProperties() const;
};
}
#endif // ENABLE(SVG)
#endif