Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::PathParser Class Referenceabstract

#include <PathParser.h>

Inheritance diagram for gnash::PathParser:

Public Member Functions

 PathParser (const std::vector< Path > &paths, size_t num_styles)
 
virtual ~PathParser ()
 
void run (const SWFCxForm &cx, const SWFMatrix &mat)
 
virtual void prepareFill (int fill_style, const SWFCxForm &cx)=0
 
virtual void terminateFill (int fill_style)=0
 
virtual void fillShape ()
 
virtual void moveTo (const point &p)=0
 
virtual void curveTo (const Edge &curve)=0
 Draw the given curve using the path pencil. More...
 
virtual void lineTo (const point &p)=0
 Draw a straight line to the given point. More...
 

Detailed Description

PathParser is a class which aims to efficiently transpose Flash paths into well formed, single-filled shapes. A renderer should utilize this class by subclassing PathParser. The methods reimplemented will receive low level path information (e.g., moveTo).

Constructor & Destructor Documentation

§ PathParser()

gnash::PathParser::PathParser ( const std::vector< Path > &  paths,
size_t  num_styles 
)
Parameters
pathslist of Flash paths to be 'parsed'.
num_stylescount of fill styles pointed to by the first argument.

§ ~PathParser()

virtual gnash::PathParser::~PathParser ( )
inlinevirtual

Member Function Documentation

§ curveTo()

virtual void gnash::PathParser::curveTo ( const Edge curve)
pure virtual

Draw the given curve using the path pencil.

Referenced by run().

§ fillShape()

virtual void gnash::PathParser::fillShape ( )
inlinevirtual

Fill a single shape. Implementation is optional, because most renderers can handle multiple well-formed, singly-filled shapes and can do the render/fill stage during terminateFill(). However, those that can't may implement this method.

References gnash::key::p.

Referenced by run().

§ lineTo()

virtual void gnash::PathParser::lineTo ( const point p)
pure virtual

Draw a straight line to the given point.

Referenced by run().

§ moveTo()

virtual void gnash::PathParser::moveTo ( const point p)
pure virtual

Move the path pencil to the given location. Thus a new shape should be started. The parser may invoke this method several times for a single fill style, creating several shapes.

Referenced by run().

§ prepareFill()

virtual void gnash::PathParser::prepareFill ( int  fill_style,
const SWFCxForm cx 
)
pure virtual

Prepare the fill style for subsequent use for filling one or more shapes.

Parameters
fill_stylefill style number, as indicated by class Path.

Referenced by run().

§ run()

void gnash::PathParser::run ( const SWFCxForm cx,
const SWFMatrix mat 
)

§ terminateFill()

virtual void gnash::PathParser::terminateFill ( int  fill_style)
pure virtual

Terminates the fill style, that is, precludes the fill style from further use, which may be freed or otherwise cleaned up. Most renderers should fill the paths previously parsed.

Referenced by run().


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