PolygonVersionB Class Reference

Version B of the polygon filler. Uses fixed point math in the edge calculations. More...

#include <PolygonVersionB.h>

Inheritance diagram for PolygonVersionB:

PolygonFiller Renderer List of all members.

Public Member Functions

 PolygonVersionB ()
 Constructor.
bool init (unsigned int aWidth, unsigned int aHeight)
 Initializer.
virtual ~PolygonVersionB ()
 Virtual destructor.
virtual void renderEvenOdd (BitmapData *aTarget, const Polygon *aPolygon, unsigned long aColor, const MATRIX2D &aTransformation)
 Renders the polygon with even-odd fill.
virtual void renderNonZeroWinding (BitmapData *aTarget, const Polygon *aPolygon, unsigned long aColor, const MATRIX2D &aTransformation)
 Renders the polygon with non-zero winding fill.
virtual void setClipRect (unsigned int aX, unsigned int aY, unsigned int aWidth, unsigned int aHeight)
 Sets the clip rectangle for the polygon filler.

Protected Member Functions

bool isSupported (BitmapData::BitmapFormat aFormat)
 Checks if a surface format is supported.
void addEvenOddEdge (const PolygonEdge &aEdge)
 Adds an edge to be used with even-odd fill.
void fillEvenOdd (BitmapData *aTarget, unsigned long aColor, const ClipRectangle &aClipRect)
 Renders the mask to the canvas with even-odd fill.
void addNonZeroEdge (const PolygonEdge &aEdge)
 Adds an edge to be used with non-zero winding fill.
void fillNonZero (BitmapData *aTarget, unsigned long aColor, const ClipRectangle &aClipRect)
 Renders the mask to the canvas with non-zero winding fill.

Protected Attributes

SUBPIXEL_DATA * mMaskBuffer
NON_ZERO_MASK_DATA_UNIT * mWindingBuffer
unsigned int mWidth
unsigned int mBufferWidth
unsigned int mHeight
ClipRectangle mClipRect
MATRIX2D mRemappingMatrix

Detailed Description

Version B of the polygon filler. Uses fixed point math in the edge calculations.


Constructor & Destructor Documentation

PolygonVersionB::PolygonVersionB  ) 
 

Constructor.

PolygonVersionB::~PolygonVersionB  )  [virtual]
 

Virtual destructor.


Member Function Documentation

void PolygonVersionB::addEvenOddEdge const PolygonEdge aEdge  )  [protected]
 

Adds an edge to be used with even-odd fill.

void PolygonVersionB::addNonZeroEdge const PolygonEdge aEdge  )  [protected]
 

Adds an edge to be used with non-zero winding fill.

void PolygonVersionB::fillEvenOdd BitmapData aTarget,
unsigned long  aColor,
const ClipRectangle aClipRect
[protected]
 

Renders the mask to the canvas with even-odd fill.

void PolygonVersionB::fillNonZero BitmapData aTarget,
unsigned long  aColor,
const ClipRectangle aClipRect
[protected]
 

Renders the mask to the canvas with non-zero winding fill.

bool PolygonVersionB::init unsigned int  aWidth,
unsigned int  aHeight
 

Initializer.

aWidth and aHeight define the maximum output size for the filler. The filler will output to larger bitmaps as well, but the output will be cropped.

bool PolygonVersionB::isSupported BitmapData::BitmapFormat  aFormat  )  [protected]
 

Checks if a surface format is supported.

void PolygonVersionB::renderEvenOdd BitmapData aTarget,
const Polygon aPolygon,
unsigned long  aColor,
const MATRIX2D &  aTransformation
[virtual]
 

Renders the polygon with even-odd fill.

Parameters:
aTarget the target bitmap.
aPolygon the polygon to render.
aColor the color to be used for rendering.
aTransformation the transformation matrix.

Implements PolygonFiller.

void PolygonVersionB::renderNonZeroWinding BitmapData aTarget,
const Polygon aPolygon,
unsigned long  aColor,
const MATRIX2D &  aTransformation
[virtual]
 

Renders the polygon with non-zero winding fill.

Parameters:
aTarget the target bitmap.
aPolygon the polygon to render.
aColor the color to be used for rendering.
aTransformation the transformation matrix.

Implements PolygonFiller.

void PolygonVersionB::setClipRect unsigned int  aX,
unsigned int  aY,
unsigned int  aWidth,
unsigned int  aHeight
[virtual]
 

Sets the clip rectangle for the polygon filler.

Implements PolygonFiller.


Member Data Documentation

unsigned int PolygonVersionB::mBufferWidth [protected]
 

ClipRectangle PolygonVersionB::mClipRect [protected]
 

unsigned int PolygonVersionB::mHeight [protected]
 

SUBPIXEL_DATA* PolygonVersionB::mMaskBuffer [protected]
 

MATRIX2D PolygonVersionB::mRemappingMatrix [protected]
 

unsigned int PolygonVersionB::mWidth [protected]
 

NON_ZERO_MASK_DATA_UNIT* PolygonVersionB::mWindingBuffer [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Aug 3 00:44:39 2007 for Scanline edge-flag algorithm for antialiasing by  doxygen 1.4.6-NO