2 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef SVGMaskElement_h
21 #define SVGMaskElement_h
24 #include "SVGAnimatedBoolean.h"
25 #include "SVGAnimatedEnumeration.h"
26 #include "SVGAnimatedLength.h"
27 #include "SVGExternalResourcesRequired.h"
28 #include "SVGLangSpace.h"
29 #include "SVGStyledLocatableElement.h"
31 #include "SVGUnitTypes.h"
35 class SVGMaskElement : public SVGStyledLocatableElement,
38 public SVGExternalResourcesRequired {
40 static PassRefPtr<SVGMaskElement> create(const QualifiedName&, Document*);
42 FloatRect maskBoundingBox(const FloatRect&) const;
45 SVGMaskElement(const QualifiedName&, Document*);
47 virtual bool isValid() const { return SVGTests::isValid(); }
48 virtual bool needsPendingResourceHandling() const { return false; }
50 bool isSupportedAttribute(const QualifiedName&);
51 virtual void parseMappedAttribute(Attribute*);
52 virtual void svgAttributeChanged(const QualifiedName&);
53 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
55 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
57 virtual bool selfHasRelativeLengths() const;
59 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMaskElement)
60 DECLARE_ANIMATED_ENUMERATION(MaskUnits, maskUnits, SVGUnitTypes::SVGUnitType)
61 DECLARE_ANIMATED_ENUMERATION(MaskContentUnits, maskContentUnits, SVGUnitTypes::SVGUnitType)
62 DECLARE_ANIMATED_LENGTH(X, x)
63 DECLARE_ANIMATED_LENGTH(Y, y)
64 DECLARE_ANIMATED_LENGTH(Width, width)
65 DECLARE_ANIMATED_LENGTH(Height, height)
66 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
67 END_DECLARE_ANIMATED_PROPERTIES
70 virtual void synchronizeRequiredFeatures() { SVGTests::synchronizeRequiredFeatures(this); }
71 virtual void synchronizeRequiredExtensions() { SVGTests::synchronizeRequiredExtensions(this); }
72 virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLanguage(this); }