Public Types | Public Member Functions

gnash::BitmapFill Class Reference

A BitmapFill. More...

#include <FillStyle.h>

Collaboration diagram for gnash::BitmapFill:
Collaboration graph
[legend]

List of all members.

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 (const BitmapFill &other)
 Copy a BitmapFill.
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 CachedBitmapbitmap () const
 Get the actual Bitmap data.
const SWFMatrixmatrix () const
 Get the matrix of this BitmapFill.

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

How to smooth the bitmap.

Enumerator:
SMOOTHING_UNSPECIFIED 
SMOOTHING_ON 
SMOOTHING_OFF 

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

gnash::BitmapFill::BitmapFill ( Type  t,
const CachedBitmap bi,
const SWFMatrix m,
SmoothingPolicy  pol 
) [inline]

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.

gnash::BitmapFill::BitmapFill ( const BitmapFill other  )  [inline]

Copy a BitmapFill.

The copied BitmapFill refers to the same bitmap id in the same movie_definition as the original.


Member Function Documentation

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

Get the actual Bitmap data.

Referenced by gnash::AddStyles::operator()().

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

Get the matrix of this BitmapFill.

Referenced by gnash::AddStyles::operator()().

void gnash::BitmapFill::setLerp ( const BitmapFill a,
const BitmapFill b,
double  ratio 
)

Set this fill to a lerp of two other BitmapFills.

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::AddStyles::operator()().


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