Gnash
0.8.11dev
|
#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, SWFMatrix m, SmoothingPolicy pol) | |
Construct a BitmapFill from arbitrary bitmap data. More... | |
BitmapFill (SWF::FillType t, movie_definition *md, std::uint16_t id, SWFMatrix m) | |
Construct a static BitmapFill using a SWF tag. More... | |
~BitmapFill () | |
Destructor. More... | |
BitmapFill (const BitmapFill &other) | |
Copy a BitmapFill. More... | |
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. More... | |
Type | type () const |
Get the Type of this BitmapFill. More... | |
SmoothingPolicy | smoothingPolicy () const |
Get the smoothing policy of this BitmapFill. More... | |
const CachedBitmap * | bitmap () const |
Get the actual Bitmap data. More... | |
const SWFMatrix & | matrix () const |
Get the matrix of this BitmapFill. More... | |
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, | ||
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, | ||
std::uint16_t | id, | ||
SWFMatrix | m | ||
) |
Construct a static BitmapFill using a SWF tag.
References CLIPPED, gnash::SWF::FILL_CLIPPED_BITMAP, gnash::SWF::FILL_CLIPPED_BITMAP_HARD, gnash::SWF::FILL_TILED_BITMAP, gnash::SWF::FILL_TILED_BITMAP_HARD, gnash::movie_definition::get_version(), SMOOTHING_OFF, SMOOTHING_ON, SMOOTHING_UNSPECIFIED, and TILED.
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()().
|
inline |
Get the matrix of this BitmapFill.
Referenced by gnash::renderer::openvg::StyleHandler::operator()(), gnash::AddStyles::operator()(), gnash::operator<<(), and setLerp().
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 matrix(), and gnash::SWFMatrix::set_lerp().
|
inline |
Get the smoothing policy of this BitmapFill.
Referenced by gnash::operator<<().
|
inline |
Get the Type of this BitmapFill.
BitmapFills are either tiled or clipped.
Referenced by gnash::renderer::openvg::StyleHandler::operator()(), gnash::operator<<(), and gnash::GradientFill::setLerp().