• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.14
  • kdelibs
  • khtml
  • svg
  • graphics
SVGResourceFilter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3  2004, 2005 Rob Buis <buis@kde.org>
4  2005 Eric Seidel <eric@webkit.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  aint with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef SVGResourceFilter_h
23 #define SVGResourceFilter_h
24 
25 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
26 #include "SVGResource.h"
27 #include "SVGFilterEffect.h"
28 
29 #include "FloatRect.h"
30 
31 #include <wtf/OwnPtr.h>
32 
33 namespace WebCore {
34 
35 class GraphicsContext;
36 class SVGFilterEffect;
37 
38 class SVGResourceFilterPlatformData {
39 public:
40  virtual ~SVGResourceFilterPlatformData() {}
41 };
42 
43 class SVGResourceFilter : public SVGResource {
44 public:
45  SVGResourceFilter();
46 
47  virtual SVGResourceType resourceType() const { return FilterResourceType; }
48 
49  bool filterBoundingBoxMode() const { return m_filterBBoxMode; }
50  void setFilterBoundingBoxMode(bool bboxMode) { m_filterBBoxMode = bboxMode; }
51 
52  bool effectBoundingBoxMode() const { return m_effectBBoxMode; }
53  void setEffectBoundingBoxMode(bool bboxMode) { m_effectBBoxMode = bboxMode; }
54 
55  bool xBoundingBoxMode() const { return m_xBBoxMode; }
56  void setXBoundingBoxMode(bool bboxMode) { m_xBBoxMode = bboxMode; }
57 
58  bool yBoundingBoxMode() const { return m_yBBoxMode; }
59  void setYBoundingBoxMode(bool bboxMode) { m_yBBoxMode = bboxMode; }
60 
61  FloatRect filterRect() const { return m_filterRect; }
62  void setFilterRect(const FloatRect& rect) { m_filterRect = rect; }
63 
64  FloatRect filterBBoxForItemBBox(const FloatRect& itemBBox) const;
65 
66  void clearEffects();
67  void addFilterEffect(SVGFilterEffect*);
68 
69  virtual TextStream& externalRepresentation(TextStream&) const;
70 
71  // To be implemented in platform specific code.
72  void prepareFilter(GraphicsContext*&, const FloatRect& bbox);
73  void applyFilter(GraphicsContext*&, const FloatRect& bbox);
74 
75  SVGResourceFilterPlatformData* platformData() { return m_platformData.get(); }
76  const Vector<SVGFilterEffect*>& effects() { return m_effects; }
77 
78 private:
79  SVGResourceFilterPlatformData* createPlatformData();
80 
81  OwnPtr<SVGResourceFilterPlatformData> m_platformData;
82 
83  bool m_filterBBoxMode : 1;
84  bool m_effectBBoxMode : 1;
85 
86  bool m_xBBoxMode : 1;
87  bool m_yBBoxMode : 1;
88 
89  FloatRect m_filterRect;
90  Vector<SVGFilterEffect*> m_effects;
91 };
92 
93 SVGResourceFilter* getFilterById(Document*, const AtomicString&);
94 
95 } // namespace WebCore
96 
97 #endif // ENABLE(SVG)
98 
99 #endif // SVGResourceFilter_h
SVGResource.h
SVGFilterEffect.h
FloatRect.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal