Gnash  0.8.11dev
filter_factory.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef GNASH_FILTER_FACTORY_H
20 #define GNASH_FILTER_FACTORY_H
21 
22 #include <vector>
23 #include <memory>
24 
25 namespace gnash {
26  class SWFStream;
27  class BitmapFilter;
28 }
29 
30 namespace gnash {
31 
32 typedef std::vector<std::unique_ptr<BitmapFilter> > Filters;
33 
35 {
36 public:
41  static int read(SWFStream& in, bool read_multiple,
42  Filters* store);
43 };
44 
45 } // Namespace gnash
46 
47 #endif // GNASH_FILTER_FACTORY_H
gnash::DropShadowFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:112
gnash::ConvolutionFilter::_matrixY
std::uint8_t _matrixY
Definition: Filters.h:184
gnash::BevelFilter::m_angle
float m_angle
Definition: Filters.h:87
gnash::GradientBevelFilter::OUTER_BEVEL
@ OUTER_BEVEL
Definition: Filters.h:273
gnash::ConvolutionFilter::_color
std::uint32_t _color
Definition: Filters.h:190
gnash::ConvolutionFilter::_divisor
float _divisor
Definition: Filters.h:186
gnash::GradientGlowFilter::m_distance
float m_distance
Definition: Filters.h:346
gnash::DropShadowFilter::m_blurY
float m_blurY
Definition: Filters.h:223
gnash::GlowFilter::m_color
std::uint32_t m_color
Definition: Filters.h:255
gnash::SWFStream::read_uint
unsigned read_uint(unsigned short bitcount)
Reads a bit-packed unsigned integer from the stream and returns it. The given bitcount determines the...
Definition: SWFStream.cpp:102
gnash::ColorMatrixFilter::m_matrix
std::vector< float > m_matrix
Definition: Filters.h:140
gnash::GradientBevelFilter::INNER_BEVEL
@ INNER_BEVEL
Definition: Filters.h:272
gnash::GlowFilter::m_strength
float m_strength
Definition: Filters.h:259
gnash::BevelFilter::m_shadowAlpha
std::uint8_t m_shadowAlpha
Definition: Filters.h:91
gnash::ColorMatrixFilter
Definition: Filters.h:124
gnash::log_swferror
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
gnash::BevelFilter::m_distance
float m_distance
Definition: Filters.h:86
gnash::GradientGlowFilter::m_colors
std::vector< std::uint32_t > m_colors
Definition: Filters.h:348
gnash::GlowFilter::m_blurY
float m_blurY
Definition: Filters.h:258
gnash::DropShadowFilter::m_strength
float m_strength
Definition: Filters.h:224
gnash::DropShadowFilter::m_distance
float m_distance
Definition: Filters.h:218
gnash::GradientGlowFilter::m_knockout
bool m_knockout
Definition: Filters.h:356
gnash::BitmapFilter
Definition: Filters.h:35
gnash::BlurFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:141
gnash::key::i
@ i
Definition: GnashKey.h:155
gnash::BevelFilter::m_highlightColor
std::uint32_t m_highlightColor
Definition: Filters.h:88
gnash::GradientGlowFilter::m_angle
float m_angle
Definition: Filters.h:347
gnash::DropShadowFilter::m_color
std::uint32_t m_color
Definition: Filters.h:220
_
#define _(String)
Definition: log.h:44
Filters.h
gnash::SWFStream::read_long_float
float read_long_float()
Read a 32bit (1:sign 8:exp 23:mantissa) floating point value.
Definition: SWFStream.cpp:285
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::DropShadowFilter::m_angle
float m_angle
Definition: Filters.h:219
gnash::GradientBevelFilter::m_blurY
float m_blurY
Definition: Filters.h:306
gnash::BlurFilter
Definition: Filters.h:102
gnash::BLUR
@ BLUR
Definition: filter_factory.cpp:31
gnash::GradientGlowFilter::m_blurY
float m_blurY
Definition: Filters.h:352
gnash::BlurFilter::m_blurY
float m_blurY
Definition: Filters.h:118
gnash::GradientBevelFilter::m_distance
float m_distance
Definition: Filters.h:300
gnash::GlowFilter::m_blurX
float m_blurX
Definition: Filters.h:257
gnash::GradientBevelFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:336
gnash::ConvolutionFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:272
gnash::filter_factory::read
static int read(SWFStream &in, bool read_multiple, Filters *store)
Read one, possibly multiple filters from the stream, and push them into the vector store....
Definition: filter_factory.cpp:41
gnash::BevelFilter::m_highlightAlpha
std::uint8_t m_highlightAlpha
Definition: Filters.h:89
gnash::ConvolutionFilter
Definition: Filters.h:145
gnash::GRADIENT_BEVEL
@ GRADIENT_BEVEL
Definition: filter_factory.cpp:37
gnash::GlowFilter::m_alpha
std::uint8_t m_alpha
Definition: Filters.h:256
gnash::GradientBevelFilter::FULL_BEVEL
@ FULL_BEVEL
Definition: Filters.h:274
gnash::GradientGlowFilter::m_type
glow_types m_type
Definition: Filters.h:355
gnash::GradientBevelFilter::m_quality
std::uint8_t m_quality
Definition: Filters.h:308
gnash::ConvolutionFilter::_matrix
std::vector< float > _matrix
Definition: Filters.h:185
gnash::GradientGlowFilter
Definition: Filters.h:315
gnash::GradientBevelFilter::m_ratios
std::vector< std::uint8_t > m_ratios
Definition: Filters.h:304
IF_VERBOSE_MALFORMED_SWF
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
gnash::SWFStream::read_fixed
float read_fixed()
Read a 16.16 fixed point signed value.
Definition: SWFStream.cpp:208
gnash::DropShadowFilter::m_blurX
float m_blurX
Definition: Filters.h:222
gnash::BevelFilter::INNER_BEVEL
@ INNER_BEVEL
Definition: Filters.h:51
gnash::BevelFilter::FULL_BEVEL
@ FULL_BEVEL
Definition: Filters.h:52
gnash::GradientBevelFilter::m_colors
std::vector< std::uint32_t > m_colors
Definition: Filters.h:302
gnash::ConvolutionFilter::_preserveAlpha
bool _preserveAlpha
Definition: Filters.h:188
gnash::DROP_SHADOW
@ DROP_SHADOW
Definition: filter_factory.cpp:30
gnash::GradientBevelFilter::m_angle
float m_angle
Definition: Filters.h:301
gnash::DropShadowFilter::m_inner
bool m_inner
Definition: Filters.h:226
gnash::SWFStream::read_short_sfixed
float read_short_sfixed()
Read a 8.8 fixed point signed value.
Definition: SWFStream.cpp:235
gnash::DropShadowFilter::m_alpha
std::uint8_t m_alpha
Definition: Filters.h:221
gnash::BevelFilter::m_shadowColor
std::uint32_t m_shadowColor
Definition: Filters.h:90
gnash::DropShadowFilter::m_hideObject
bool m_hideObject
Definition: Filters.h:228
gnash::BevelFilter::m_type
bevel_type m_type
Definition: Filters.h:96
gnash::ColorMatrixFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:307
gnash::key::p
@ p
Definition: GnashKey.h:162
gnash::DropShadowFilter
Definition: Filters.h:196
gnash::Filters
std::vector< std::unique_ptr< BitmapFilter > > Filters
Definition: filter_factory.h:32
gnash::GradientGlowFilter::m_strength
float m_strength
Definition: Filters.h:353
gnash::GradientGlowFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:224
gnash::BevelFilter::OUTER_BEVEL
@ OUTER_BEVEL
Definition: Filters.h:50
gnash::BEVEL
@ BEVEL
Definition: filter_factory.cpp:33
gnash::ConvolutionFilter::_clamp
bool _clamp
Definition: Filters.h:189
gnash::GradientGlowFilter::m_alphas
std::vector< std::uint8_t > m_alphas
Definition: Filters.h:349
gnash::BevelFilter::m_blurX
float m_blurX
Definition: Filters.h:92
gnash::GradientGlowFilter::FULL_GLOW
@ FULL_GLOW
Definition: Filters.h:321
gnash::BevelFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:186
gnash::GradientBevelFilter
Definition: Filters.h:268
gnash::GradientBevelFilter::m_alphas
std::vector< std::uint8_t > m_alphas
Definition: Filters.h:303
filter_factory.h
gnash::GradientGlowFilter::INNER_GLOW
@ INNER_GLOW
Definition: Filters.h:319
IF_VERBOSE_PARSE
#define IF_VERBOSE_PARSE(x)
Definition: log.h:378
gnash::CONVOLUTION
@ CONVOLUTION
Definition: filter_factory.cpp:35
gnash::log_parse
void log_parse(StringType msg, Args... args)
Definition: log.h:313
log.h
gnash::GRADIENT_GLOW
@ GRADIENT_GLOW
Definition: filter_factory.cpp:34
gnash::SWFStream::read_ufixed
float read_ufixed()
Read a 16.16 fixed point unsigned value.
Definition: SWFStream.cpp:219
gnash::GradientGlowFilter::m_blurX
float m_blurX
Definition: Filters.h:351
gnash::GradientBevelFilter::m_type
glow_types m_type
Definition: Filters.h:309
gnash::BevelFilter::m_knockout
bool m_knockout
Definition: Filters.h:97
gnash::BevelFilter::m_blurY
float m_blurY
Definition: Filters.h:93
gnash::GlowFilter::m_knockout
bool m_knockout
Definition: Filters.h:262
gnash::GlowFilter::m_inner
bool m_inner
Definition: Filters.h:261
gnash::GradientBevelFilter::m_blurX
float m_blurX
Definition: Filters.h:305
gnash::GradientBevelFilter::m_knockout
bool m_knockout
Definition: Filters.h:310
gnash::BlurFilter::m_quality
std::uint8_t m_quality
Definition: Filters.h:119
gnash::filter_types
filter_types
Definition: filter_factory.cpp:29
gnash::COLOR_MATRIX
@ COLOR_MATRIX
Definition: filter_factory.cpp:36
gnash::GlowFilter
Definition: Filters.h:234
gnash::GradientGlowFilter::OUTER_GLOW
@ OUTER_GLOW
Definition: Filters.h:320
gnash::SWFStream::read_u8
std::uint8_t read_u8()
Read a aligned unsigned 8-bit value from the stream.
Definition: SWFStream.cpp:319
gnash::ConvolutionFilter::_matrixX
std::uint8_t _matrixX
Definition: Filters.h:183
gnash::SWFStream::read_bit
bool read_bit()
Reads a single bit off the stream and returns it.
Definition: SWFStream.cpp:88
gnash::BevelFilter
Definition: Filters.h:46
gnash::SWFStream
SWF stream wrapper class.
Definition: SWFStream.h:59
gnash::ConvolutionFilter::_bias
float _bias
Definition: Filters.h:187
gnash::SWFStream::ensureBytes
void ensureBytes(unsigned long needed)
Ensure the requested number of bytes are available for an aligned read in the currently opened tag.
Definition: SWFStream.cpp:50
gnash::BlurFilter::m_blurX
float m_blurX
Definition: Filters.h:117
SWFStream.h
gnash::GLOW
@ GLOW
Definition: filter_factory.cpp:32
gnash::DropShadowFilter::m_knockout
bool m_knockout
Definition: Filters.h:227
gnash::ConvolutionFilter::_alpha
std::uint8_t _alpha
Definition: Filters.h:191
gnash::GradientGlowFilter::m_quality
std::uint8_t m_quality
Definition: Filters.h:354
gnash::GlowFilter::read
virtual bool read(SWFStream &in)
Definition: filter_factory.cpp:160
gnash::GradientGlowFilter::m_ratios
std::vector< std::uint8_t > m_ratios
Definition: Filters.h:350
gnash::BevelFilter::m_strength
float m_strength
Definition: Filters.h:94
gnash::filter_factory
Definition: filter_factory.h:35
gnash::GradientBevelFilter::m_strength
float m_strength
Definition: Filters.h:307