Gnash  0.8.11dev
Public Types | Public Member Functions | List of all members
gnash::BitmapFill Class Reference

A BitmapFill. More...

#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...
 
BitmapFilloperator= (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 CachedBitmapbitmap () const
 Get the actual Bitmap data. More...
 
const SWFMatrixmatrix () const
 Get the matrix of this BitmapFill. More...
 

Detailed Description

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.

Member Enumeration Documentation

§ SmoothingPolicy

How to smooth the bitmap.

Enumerator
SMOOTHING_UNSPECIFIED 
SMOOTHING_ON 
SMOOTHING_OFF 

§ Type

Whether the fill is tiled or clipped.

Clipped fills use the edge pixels to fill any area outside the bounds of the image.

Enumerator
CLIPPED 
TILED 

Constructor & Destructor Documentation

§ BitmapFill() [1/3]

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!

§ BitmapFill() [2/3]

gnash::BitmapFill::BitmapFill ( SWF::FillType  t,
movie_definition md,
std::uint16_t  id,
SWFMatrix  m 
)

§ ~BitmapFill()

gnash::BitmapFill::~BitmapFill ( )

Destructor.

§ BitmapFill() [3/3]

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.

Member Function Documentation

§ bitmap()

const CachedBitmap * gnash::BitmapFill::bitmap ( ) const

§ matrix()

const SWFMatrix& gnash::BitmapFill::matrix ( ) const
inline

§ operator=()

BitmapFill & gnash::BitmapFill::operator= ( const BitmapFill other)

§ setLerp()

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().

§ smoothingPolicy()

SmoothingPolicy gnash::BitmapFill::smoothingPolicy ( ) const
inline

Get the smoothing policy of this BitmapFill.

Referenced by gnash::operator<<().

§ type()

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()(), gnash::operator<<(), and gnash::GradientFill::setLerp().


The documentation for this class was generated from the following files: