KHTML
SVGFilterEffect.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SVGFilterEffect_h
00023 #define SVGFilterEffect_h
00024
00025 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
00026 #include "FloatRect.h"
00027 #include "PlatformString.h"
00028
00029 #if PLATFORM(CI)
00030 #ifdef __OBJC__
00031 @class CIFilter;
00032 #else
00033 class CIFilter;
00034 #endif
00035 #endif
00036
00037 namespace WebCore {
00038
00039 class SVGResourceFilter;
00040 class TextStream;
00041
00042 class SVGFilterEffect {
00043 public:
00044 SVGFilterEffect(SVGResourceFilter*);
00045 virtual ~SVGFilterEffect() { }
00046
00047 bool xBoundingBoxMode() const { return m_xBBoxMode; }
00048 void setXBoundingBoxMode(bool bboxMode) { m_xBBoxMode = bboxMode; }
00049
00050 bool yBoundingBoxMode() const { return m_yBBoxMode; }
00051 void setYBoundingBoxMode(bool bboxMode) { m_yBBoxMode = bboxMode; }
00052
00053 bool widthBoundingBoxMode() const { return m_widthBBoxMode; }
00054 void setWidthBoundingBoxMode(bool bboxMode) { m_widthBBoxMode = bboxMode; }
00055
00056 bool heightBoundingBoxMode() const { return m_heightBBoxMode; }
00057 void setHeightBoundingBoxMode(bool bboxMode) { m_heightBBoxMode = bboxMode; }
00058
00059 FloatRect primitiveBBoxForFilterBBox(const FloatRect& filterBBox, const FloatRect& itemBBox) const;
00060
00061 FloatRect subRegion() const;
00062 void setSubRegion(const FloatRect&);
00063
00064 String in() const;
00065 void setIn(const String&);
00066
00067 String result() const;
00068 void setResult(const String&);
00069
00070 SVGResourceFilter* filter() const;
00071 void setFilter(SVGResourceFilter*);
00072
00073 virtual TextStream& externalRepresentation(TextStream&) const;
00074
00075 #if PLATFORM(CI)
00076 virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
00077 #endif
00078
00079 private:
00080 SVGResourceFilter* m_filter;
00081
00082 bool m_xBBoxMode : 1;
00083 bool m_yBBoxMode : 1;
00084 bool m_widthBBoxMode : 1;
00085 bool m_heightBBoxMode : 1;
00086
00087 FloatRect m_subRegion;
00088
00089 String m_in;
00090 String m_result;
00091 };
00092
00093 TextStream& operator<<(TextStream&, const SVGFilterEffect&);
00094
00095 }
00096
00097 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
00098
00099 #endif // SVGFilterEffect_h