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 gnash::SWFMatrix &mat, const gnash::cxform &cx, bool repeat, bool smooth)
 Adds a new bitmap fill style.
template<typename T >
void addLinearGradient (const GradientFill &fs, const gnash::SWFMatrix &mat, const gnash::cxform &cx)
template<typename T >
void addFocalGradient (const GradientFill &fs, const gnash::SWFMatrix &mat, const gnash::cxform &cx)
template<typename T >
void addRadialGradient (const GradientFill &fs, const gnash::SWFMatrix &mat, const gnash::cxform &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 gnash::SWFMatrix &mat, const gnash::cxform &cx)
 Add a bitmap with the specified filter.

Public Attributes

std::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]

References _styles, and gnash::deleteChecked().


Member Function Documentation

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

Adds a new bitmap fill style.

References add_color().

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

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

Add a bitmap with the specified filter.

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

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

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

References _styles.

template<typename T >
void gnash::StyleHandler::addRadialGradient ( const GradientFill fs,
const gnash::SWFMatrix mat,
const gnash::cxform cx 
) [inline]
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 _styles.


Member Data Documentation

Referenced by color().


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