Gnash  0.8.10
Public Types | Public Member Functions
gnash::BitmapFill Class Reference

A BitmapFill. More...

#include <FillStyle.h>

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 ()
 Destructor.
 BitmapFill (const BitmapFill &other)
 Copy a BitmapFill.
BitmapFilloperator= (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 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. 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

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 
)

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


Member Function Documentation

const CachedBitmap * gnash::BitmapFill::bitmap ( ) const
const SWFMatrix& gnash::BitmapFill::matrix ( ) const [inline]
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()().


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