1 /* 2 * Copyright (C) 2005 Alexander Kellett <lypanov (at) kde.org> 3 * 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. 8 * 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. 13 * 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. 18 */ 19 20 #ifndef SVGMaskElement_h 21 #define SVGMaskElement_h 22 23 #if ENABLE(SVG) 24 #include "SVGAnimatedBoolean.h" 25 #include "SVGAnimatedEnumeration.h" 26 #include "SVGAnimatedLength.h" 27 #include "SVGExternalResourcesRequired.h" 28 #include "SVGLangSpace.h" 29 #include "SVGStyledLocatableElement.h" 30 #include "SVGTests.h" 31 32 namespace WebCore { 33 34 class SVGMaskElement : public SVGStyledLocatableElement, 35 public SVGTests, 36 public SVGLangSpace, 37 public SVGExternalResourcesRequired { 38 public: 39 static PassRefPtr<SVGMaskElement> create(const QualifiedName&, Document*); 40 41 FloatRect maskBoundingBox(const FloatRect&) const; 42 43 private: 44 SVGMaskElement(const QualifiedName&, Document*); 45 46 virtual bool isValid() const { return SVGTests::isValid(); } 47 virtual bool needsPendingResourceHandling() const { return false; } 48 49 virtual void parseMappedAttribute(Attribute*); 50 virtual void svgAttributeChanged(const QualifiedName&); 51 virtual void synchronizeProperty(const QualifiedName&); 52 virtual void fillAttributeToPropertyTypeMap(); 53 virtual AttributeToPropertyTypeMap& attributeToPropertyTypeMap(); 54 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 55 56 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 57 58 virtual bool selfHasRelativeLengths() const; 59 60 // Animated property declarations 61 DECLARE_ANIMATED_ENUMERATION(MaskUnits, maskUnits) 62 DECLARE_ANIMATED_ENUMERATION(MaskContentUnits, maskContentUnits) 63 DECLARE_ANIMATED_LENGTH(X, x) 64 DECLARE_ANIMATED_LENGTH(Y, y) 65 DECLARE_ANIMATED_LENGTH(Width, width) 66 DECLARE_ANIMATED_LENGTH(Height, height) 67 68 // SVGExternalResourcesRequired 69 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 70 }; 71 72 } 73 74 #endif 75 #endif 76