KHtml

SVGFilterElement.h
1 /*
2  Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <[email protected]>
3  Copyright (C) 2004, 2005, 2006 Rob Buis <[email protected]>
4  Copyright (C) 2006 Samuel Weinig <[email protected]>
5 
6  This file is part of the KDE project
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #ifndef SVGFilterElement_h
25 #define SVGFilterElement_h
26 
27 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
28 #include "SVGResourceFilter.h"
29 #include "SVGExternalResourcesRequired.h"
30 #include "SVGLangSpace.h"
31 #include "SVGStyledElement.h"
32 #include "SVGURIReference.h"
33 
34 namespace WebCore
35 {
36 class SVGLength;
37 
38 class SVGFilterElement : public SVGStyledElement,
39  public SVGURIReference,
40  public SVGLangSpace,
41  public SVGExternalResourcesRequired
42 {
43 public:
44  SVGFilterElement(const QualifiedName &, Document *);
45  virtual ~SVGFilterElement();
46 
47  virtual SVGResource *canvasResource();
48 
49  void setFilterRes(unsigned long filterResX, unsigned long filterResY) const;
50 
51  virtual void parseMappedAttribute(MappedAttribute *);
52  virtual bool rendererIsNeeded(RenderStyle *)
53  {
54  return false;
55  }
56 
57 protected:
58  virtual const SVGElement *contextElement() const
59  {
60  return this;
61  }
62 
63 private:
64  ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
65  ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
66 
67  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, int, int, FilterUnits, filterUnits)
68  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, int, int, PrimitiveUnits, primitiveUnits)
69  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGLength, SVGLength, X, x)
70  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGLength, SVGLength, Y, y)
71  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGLength, SVGLength, Width, width)
72  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, SVGLength, SVGLength, Height, height)
73  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, long, long, FilterResX, filterResX)
74  ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, long, long, FilterResY, filterResY)
75 
76  RefPtr<SVGResourceFilter> m_filter;
77 };
78 
79 } // namespace WebCore
80 
81 #endif // ENABLE(SVG)
82 #endif
83 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 25 2021 22:48:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.