KHTML
SVGFEConvolveMatrix.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 00003 2004, 2005 Rob Buis <buis@kde.org> 00004 2005 Eric Seidel <eric@webkit.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 aint with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 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; // maybe should be a real matrix? 00076 }; 00077 00078 } // namespace WebCore 00079 00080 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS) 00081 00082 #endif // SVGFEConvolveMatrix_h
KDE 4.6 API Reference