Gnash  0.8.10
Public Member Functions | Public Attributes
gnash::StyleHandler Class Reference

#include <Renderer_agg_style.h>

List of all members.

Public Member Functions

 StyleHandler ()
 ~StyleHandler ()
bool is_solid (unsigned style) const
 Called by AGG to ask if a certain style is a solid color.
void add_color (const agg::rgba8 &color)
 Adds a new solid fill color style.
void add_bitmap (const agg_bitmap_info *bi, const SWFMatrix &mat, const SWFCxForm &cx, bool repeat, bool smooth)
 Adds a new bitmap fill style.
template<typename T >
void addLinearGradient (const GradientFill &fs, const SWFMatrix &mat, const SWFCxForm &cx)
template<typename T >
void addFocalGradient (const GradientFill &fs, const SWFMatrix &mat, const SWFCxForm &cx)
template<typename T >
void addRadialGradient (const GradientFill &fs, const SWFMatrix &mat, const SWFCxForm &cx)
agg::rgba8 color (unsigned style) const
 Returns the color of a certain fill style (solid)
void generate_span (agg::rgba8 *span, int x, int y, unsigned len, unsigned style)
 Called by AGG to generate a scanline span for non-solid fills.
template<typename Filter >
void addBitmap (const agg_bitmap_info *bi, const SWFMatrix &mat, const SWFCxForm &cx)
 Add a bitmap with the specified filter.

Public Attributes

boost::ptr_vector< AggStyle_styles
agg::rgba8 m_transparent

Detailed Description

Style handler for AGG's compound rasterizer. This is the class which is called by AGG itself. It provides an interface to the various fill style classes defined above.


Constructor & Destructor Documentation

gnash::StyleHandler::StyleHandler ( ) [inline]
gnash::StyleHandler::~StyleHandler ( ) [inline]

Member Function Documentation

void gnash::StyleHandler::add_bitmap ( const agg_bitmap_info bi,
const SWFMatrix mat,
const SWFCxForm cx,
bool  repeat,
bool  smooth 
) [inline]

Adds a new bitmap fill style.

References assert.

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

void gnash::StyleHandler::add_color ( const agg::rgba8 &  color) [inline]

Adds a new solid fill color style.

References _styles.

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

template<typename Filter >
void gnash::StyleHandler::addBitmap ( const agg_bitmap_info bi,
const SWFMatrix mat,
const SWFCxForm cx 
) [inline]

Add a bitmap with the specified filter.

Template Parameters:
FilterThe FilterType to use. This affects scaling quality, pixel type etc.

References gnash::agg_bitmap_info::get_width(), gnash::agg_bitmap_info::get_height(), gnash::agg_bitmap_info::get_rowlen(), gnash::agg_bitmap_info::get_data(), and _styles.

template<typename T >
void gnash::StyleHandler::addFocalGradient ( const GradientFill fs,
const SWFMatrix mat,
const SWFCxForm cx 
) [inline]
template<typename T >
void gnash::StyleHandler::addLinearGradient ( const GradientFill fs,
const SWFMatrix mat,
const SWFCxForm cx 
) [inline]

References gnash::key::T, and _styles.

template<typename T >
void gnash::StyleHandler::addRadialGradient ( const GradientFill fs,
const SWFMatrix mat,
const SWFCxForm cx 
) [inline]

References gnash::key::T, and _styles.

agg::rgba8 gnash::StyleHandler::color ( unsigned  style) const [inline]

Returns the color of a certain fill style (solid)

References _styles, and m_transparent.

void gnash::StyleHandler::generate_span ( agg::rgba8 *  span,
int  x,
int  y,
unsigned  len,
unsigned  style 
) [inline]

Called by AGG to generate a scanline span for non-solid fills.

References _styles.

bool gnash::StyleHandler::is_solid ( unsigned  style) const [inline]

Called by AGG to ask if a certain style is a solid color.

References assert, and _styles.


Member Data Documentation

Referenced by color().


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