#ifndef KSVG_SVGMaskElementImpl_H
#define KSVG_SVGMaskElementImpl_H
#if SVG_SUPPORT
#include "SVGTests.h"
#include "SVGLangSpace.h"
#include "SVGURIReference.h"
#include "SVGStyledLocatableElement.h"
#include "SVGExternalResourcesRequired.h"
#include "KCanvasResources.h"
class KCanvasImage;
namespace WebCore
{
class Attribute;
class SVGAnimatedLength;
class SVGMaskElement : public SVGStyledLocatableElement,
public SVGURIReference,
public SVGTests,
public SVGLangSpace,
public SVGExternalResourcesRequired
{
public:
SVGMaskElement(const QualifiedName&, Document*);
virtual ~SVGMaskElement();
virtual bool isValid() const { return SVGTests::isValid(); }
SVGAnimatedLength *x() const;
SVGAnimatedLength *y() const;
SVGAnimatedLength *width() const;
SVGAnimatedLength *height() const;
virtual void childrenChanged();
virtual void attributeChanged(Attribute* attr, bool preserveDecls);
virtual void parseMappedAttribute(MappedAttribute *attr);
virtual bool rendererIsNeeded(RenderStyle *style) { return StyledElement::rendererIsNeeded(style); }
virtual RenderObject *createRenderer(RenderArena *arena, RenderStyle *style);
virtual KCanvasMasker *canvasResource();
protected:
KCanvasImage *drawMaskerContent();
mutable RefPtr<SVGAnimatedLength> m_x;
mutable RefPtr<SVGAnimatedLength> m_y;
mutable RefPtr<SVGAnimatedLength> m_width;
mutable RefPtr<SVGAnimatedLength> m_height;
private:
KCanvasMasker *m_masker;
bool m_dirty;
};
};
#endif // SVG_SUPPORT
#endif