WebCore/svg/SVGMaskElement.h
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2     Copyright (C) 2005 Alexander Kellett <lypanov@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 "RenderObject.h"
       
    25 #include "SVGExternalResourcesRequired.h"
       
    26 #include "SVGLangSpace.h"
       
    27 #include "SVGStyledLocatableElement.h"
       
    28 #include "SVGTests.h"
       
    29 #include "SVGURIReference.h"
       
    30 
       
    31 namespace WebCore {
       
    32 
       
    33     class SVGLength;
       
    34 
       
    35     class SVGMaskElement : public SVGStyledLocatableElement,
       
    36                            public SVGURIReference,
       
    37                            public SVGTests,
       
    38                            public SVGLangSpace,
       
    39                            public SVGExternalResourcesRequired {
       
    40     public:
       
    41         SVGMaskElement(const QualifiedName&, Document*);
       
    42         virtual ~SVGMaskElement();
       
    43         virtual bool isValid() const { return SVGTests::isValid(); }
       
    44 
       
    45         FloatRect maskBoundingBox(const FloatRect&) const;
       
    46         virtual void parseMappedAttribute(Attribute*);
       
    47         virtual void svgAttributeChanged(const QualifiedName&);
       
    48         virtual void synchronizeProperty(const QualifiedName&);
       
    49         virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
       
    50 
       
    51         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
       
    52 
       
    53     private:
       
    54         virtual bool selfHasRelativeLengths() const;
       
    55 
       
    56         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::maskUnitsAttr, int, MaskUnits, maskUnits)
       
    57         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::maskContentUnitsAttr, int, MaskContentUnits, maskContentUnits)
       
    58         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::xAttr, SVGLength, X, x)
       
    59         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::yAttr, SVGLength, Y, y)
       
    60         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::widthAttr, SVGLength, Width, width)
       
    61         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::heightAttr, SVGLength, Height, height)
       
    62 
       
    63         // SVGURIReference
       
    64         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, XLinkNames::hrefAttr, String, Href, href)
       
    65 
       
    66         // SVGExternalResourcesRequired
       
    67         DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
       
    68     };
       
    69 
       
    70 }
       
    71 
       
    72 #endif
       
    73 #endif