KHTML
SVGMaskElement.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SVGMaskElement_h
00023 #define SVGMaskElement_h
00024
00025 #if ENABLE(SVG)
00026 #include "SVGResourceMasker.h"
00027 #include "SVGExternalResourcesRequired.h"
00028 #include "SVGLangSpace.h"
00029 #include "SVGStyledLocatableElement.h"
00030 #include "SVGTests.h"
00031 #include "SVGURIReference.h"
00032
00033 namespace WebCore {
00034
00035 class SVGLength;
00036
00037 class SVGMaskElement : public SVGStyledLocatableElement,
00038 public SVGURIReference,
00039 public SVGTests,
00040 public SVGLangSpace,
00041 public SVGExternalResourcesRequired {
00042 public:
00043 SVGMaskElement(const QualifiedName&, Document*);
00044 virtual ~SVGMaskElement();
00045 virtual bool isValid() const { return SVGTests::isValid(); }
00046
00047 virtual void parseMappedAttribute(MappedAttribute*);
00048 virtual void svgAttributeChanged(const QualifiedName&);
00049 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
00050
00051 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
00052 virtual SVGResource* canvasResource();
00053
00054 std::auto_ptr<ImageBuffer> drawMaskerContent(const FloatRect& targetRect, FloatRect& maskRect) const;
00055
00056 protected:
00057 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
00058 ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
00059
00060 ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, int, int, MaskUnits, maskUnits)
00061 ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, int, int, MaskContentUnits, maskContentUnits)
00062
00063 ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, X, x)
00064 ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Y, y)
00065 ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Width, width)
00066 ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Height, height)
00067
00068 virtual const SVGElement* contextElement() const { return this; }
00069
00070 private:
00071 RefPtr<SVGResourceMasker> m_masker;
00072 };
00073
00074 }
00075
00076 #endif // ENABLE(SVG)
00077 #endif