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 #ifndef GNASH_CONVOLUTIONFILTER_H
00020 #define GNASH_CONVOLUTIONFILTER_H
00021
00022 #include "BitmapFilter.h"
00023
00024 #include <vector>
00025 #include <boost/cstdint.hpp>
00026
00027 namespace gnash {
00028
00029
00030 class ConvolutionFilter : public BitmapFilter
00031 {
00032 public:
00033
00034
00035 virtual bool read(SWFStream& in);
00036
00037 virtual ~ConvolutionFilter() {}
00038
00039 ConvolutionFilter()
00040 :
00041 _matrixX(),
00042 _matrixY(),
00043 _matrix(),
00044 _divisor(),
00045 _bias(),
00046 _preserveAlpha(false),
00047 _clamp(false),
00048 _color(),
00049 _alpha()
00050 {}
00051
00052 ConvolutionFilter(boost::uint8_t matrixX, boost::uint8_t matrixY,
00053 const std::vector<float>& _matrix, float divisor, float bias,
00054 bool preserveAlpha, bool clamp, boost::uint32_t color,
00055 boost::uint8_t alpha)
00056 :
00057 _matrixX(matrixX),
00058 _matrixY(matrixY),
00059 _matrix(_matrix),
00060 _divisor(divisor),
00061 _bias(bias),
00062 _preserveAlpha(preserveAlpha),
00063 _clamp(clamp),
00064 _color(color),
00065 _alpha(alpha)
00066 {}
00067
00068 protected:
00069 boost::uint8_t _matrixX;
00070 boost::uint8_t _matrixY;
00071 std::vector<float> _matrix;
00072 float _divisor;
00073 float _bias;
00074 bool _preserveAlpha;
00075 bool _clamp;
00076 boost::uint32_t _color;
00077 boost::uint8_t _alpha;
00078 };
00079
00080 }
00081
00082 #endif // GNASH_CONVOLUTIONFILTER_H