fix typo, add instructions about lowercase named strings
[gnash.git] / libcore / GradientBevelFilter.h
blob221faaca7dfef4e2a35d69a5e435d2fa38b5d686
1 //
2 // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef GNASH_GRADIENTBEVELFILTER_H
20 #define GNASH_GRADIENTBEVELFILTER_H
22 #include "BitmapFilter.h"
24 #include <vector>
25 #include <boost/cstdint.hpp> // for C99 int types
27 namespace gnash {
29 // A gradient bevel effect filter.
30 class GradientBevelFilter : public BitmapFilter
32 public:
33 typedef enum
35 INNER_BEVEL = 2,
36 OUTER_BEVEL = 1,
37 FULL_BEVEL = 3
38 } glow_types;
40 // Fill from a SWFStream. See parser/filter_factory.cpp for the implementations.
41 virtual bool read(SWFStream& in);
43 virtual ~GradientBevelFilter() { return; }
45 GradientBevelFilter() :
46 m_distance(0.0f), m_angle(0.0f), m_colors(), m_alphas(), m_ratios(),
47 m_blurX(0.0f), m_blurY(0.0f), m_strength(0.0f), m_quality(0),
48 m_type(INNER_BEVEL), m_knockout(false)
49 { return; }
51 GradientBevelFilter(float distance, float angle,
52 std::vector<boost::uint32_t> colors,
53 std::vector<boost::uint8_t> alphas,
54 std::vector<boost::uint8_t> ratios,
55 float blurX, float blurY, float strength,
56 boost::uint8_t quality, glow_types type, bool knockout) :
57 m_distance(distance), m_angle(angle),
58 m_colors(colors), m_alphas(alphas), m_ratios(ratios),
59 m_blurX(blurX), m_blurY(blurY), m_strength(strength),
60 m_quality(quality), m_type(type), m_knockout(knockout)
61 { return; }
63 float m_distance; // Distance of the filter in pixels.
64 float m_angle; // Angle of the filter.
65 std::vector<boost::uint32_t> m_colors; // Colors of the gradients.
66 std::vector<boost::uint8_t> m_alphas; // Alphas of the gradients.
67 std::vector<boost::uint8_t> m_ratios; // Ratios of the gradients.
68 float m_blurX; // horizontal blur
69 float m_blurY; // vertical blur
70 float m_strength; // How strong is the filter.
71 boost::uint8_t m_quality; // How many times to apply the filter.
72 glow_types m_type; // What type of effect.
73 bool m_knockout; // If true, render only the filter effect.
76 } // Namespace gnash
78 #endif // GNASH_GRADIENTBEVELFILTER_H