Gnash
0.8.10
|
#include <FillStyle.h>
Public Types | |
enum | SmoothingPolicy { SMOOTHING_UNSPECIFIED, SMOOTHING_ON, SMOOTHING_OFF } |
How to smooth the bitmap. More... | |
enum | Type { CLIPPED, TILED } |
Whether the fill is tiled or clipped. More... | |
Public Member Functions | |
BitmapFill (Type t, const CachedBitmap *bi, const SWFMatrix &m, SmoothingPolicy pol) | |
Construct a BitmapFill from arbitrary bitmap data. | |
BitmapFill (SWF::FillType t, movie_definition *md, boost::uint16_t id, const SWFMatrix &m) | |
Construct a static BitmapFill using a SWF tag. | |
~BitmapFill () | |
Destructor. | |
BitmapFill (const BitmapFill &other) | |
Copy a BitmapFill. | |
BitmapFill & | operator= (const BitmapFill &other) |
void | setLerp (const BitmapFill &a, const BitmapFill &b, double ratio) |
Set this fill to a lerp of two other BitmapFills. | |
Type | type () const |
Get the Type of this BitmapFill. | |
SmoothingPolicy | smoothingPolicy () const |
Get the smoothing policy of this BitmapFill. | |
const CachedBitmap * | bitmap () const |
Get the actual Bitmap data. | |
const SWFMatrix & | matrix () const |
Get the matrix of this BitmapFill. |
A BitmapFill.
BitmapFills can refer to a parsed bitmap tag or be constructed from bitmap data. They are used for Bitmap characters. Presently all members are immutable after construction. It is of course possible to change the appearance of the fill by changing the CachedBitmap it refers to. Special member functions (ctor, dtor etc) are not inlined to avoid requiring the definition of movie_definition. TODO: check the following: It may be necessary to allow setting the smoothing policy; the use of this should certainly be extended to non-static BitmapFills.
gnash::BitmapFill::BitmapFill | ( | Type | t, |
const CachedBitmap * | bi, | ||
const SWFMatrix & | m, | ||
SmoothingPolicy | pol | ||
) |
Construct a BitmapFill from arbitrary bitmap data.
TODO: check the smoothing policy here!
gnash::BitmapFill::BitmapFill | ( | SWF::FillType | t, |
movie_definition * | md, | ||
boost::uint16_t | id, | ||
const SWFMatrix & | m | ||
) |
Construct a static BitmapFill using a SWF tag.
References assert, gnash::movie_definition::get_version(), SMOOTHING_ON, SMOOTHING_UNSPECIFIED, gnash::key::SWF, gnash::SWF::FILL_TILED_BITMAP_HARD, TILED, SMOOTHING_OFF, gnash::SWF::FILL_TILED_BITMAP, gnash::SWF::FILL_CLIPPED_BITMAP_HARD, CLIPPED, and gnash::SWF::FILL_CLIPPED_BITMAP.
gnash::BitmapFill::~BitmapFill | ( | ) |
Destructor.
gnash::BitmapFill::BitmapFill | ( | const BitmapFill & | other | ) |
Copy a BitmapFill.
The copied BitmapFill refers to the same bitmap id in the same movie_definition as the original.
const CachedBitmap * gnash::BitmapFill::bitmap | ( | ) | const |
Get the actual Bitmap data.
References gnash::movie_definition::getBitmap().
Referenced by gnash::renderer::openvg::StyleHandler::operator()(), and gnash::AddStyles::operator()().
const SWFMatrix& gnash::BitmapFill::matrix | ( | ) | const [inline] |
Get the matrix of this BitmapFill.
Referenced by setLerp(), gnash::renderer::openvg::StyleHandler::operator()(), and gnash::AddStyles::operator()().
BitmapFill & gnash::BitmapFill::operator= | ( | const BitmapFill & | other | ) |
void gnash::BitmapFill::setLerp | ( | const BitmapFill & | a, |
const BitmapFill & | b, | ||
double | ratio | ||
) |
Set this fill to a lerp of two other BitmapFills.
References gnash::SWFMatrix::set_lerp(), and matrix().
SmoothingPolicy gnash::BitmapFill::smoothingPolicy | ( | ) | const [inline] |
Get the smoothing policy of this BitmapFill.
Referenced by gnash::AddStyles::operator()().
Type gnash::BitmapFill::type | ( | ) | const [inline] |
Get the Type of this BitmapFill.
BitmapFills are either tiled or clipped.
Referenced by gnash::renderer::openvg::StyleHandler::operator()(), and gnash::AddStyles::operator()().