KHTML
SVGFEConvolveMatrix.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 SVGFEConvolveMatrix_h
00023 #define SVGFEConvolveMatrix_h
00024
00025 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
00026 #include "SVGFilterEffect.h"
00027
00028 namespace WebCore {
00029
00030 enum SVGEdgeModeType {
00031 SVG_EDGEMODE_UNKNOWN = 0,
00032 SVG_EDGEMODE_DUPLICATE = 1,
00033 SVG_EDGEMODE_WRAP = 2,
00034 SVG_EDGEMODE_NONE = 3
00035 };
00036
00037 class SVGFEConvolveMatrix : public SVGFilterEffect {
00038 public:
00039 SVGFEConvolveMatrix(SVGResourceFilter*);
00040
00041 FloatSize kernelSize() const;
00042 void setKernelSize(FloatSize);
00043
00044 const Vector<float>& kernel() const;
00045 void setKernel(const Vector<float>&);
00046
00047 float divisor() const;
00048 void setDivisor(float);
00049
00050 float bias() const;
00051 void setBias(float);
00052
00053 FloatSize targetOffset() const;
00054 void setTargetOffset(FloatSize);
00055
00056 SVGEdgeModeType edgeMode() const;
00057 void setEdgeMode(SVGEdgeModeType);
00058
00059 FloatPoint kernelUnitLength() const;
00060 void setKernelUnitLength(FloatPoint);
00061
00062 bool preserveAlpha() const;
00063 void setPreserveAlpha(bool);
00064
00065 virtual TextStream& externalRepresentation(TextStream&) const;
00066
00067 private:
00068 FloatSize m_kernelSize;
00069 float m_divisor;
00070 float m_bias;
00071 FloatSize m_targetOffset;
00072 SVGEdgeModeType m_edgeMode;
00073 FloatPoint m_kernelUnitLength;
00074 bool m_preserveAlpha;
00075 Vector<float> m_kernelMatrix;
00076 };
00077
00078 }
00079
00080 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
00081
00082 #endif // SVGFEConvolveMatrix_h