PolygonVersionC Class Reference

Version C of the polygon filler. Similar to B, but uses edge tracking. More...

#include <PolygonVersionC.h>

Inheritance diagram for PolygonVersionC:

PolygonFiller Renderer List of all members.

Public Member Functions

 PolygonVersionC ()
 Constructor.
bool init (unsigned int aWidth, unsigned int aHeight)
 Initializer.
virtual ~PolygonVersionC ()
 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)
 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.
void resetExtents ()
 Resets the fill extents.

Protected Attributes

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

Detailed Description

Version C of the polygon filler. Similar to B, but uses edge tracking.


Constructor & Destructor Documentation

PolygonVersionC::PolygonVersionC  ) 
 

Constructor.

PolygonVersionC::~PolygonVersionC  )  [virtual]
 

Virtual destructor.


Member Function Documentation

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

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

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

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

void PolygonVersionC::fillEvenOdd BitmapData aTarget,
unsigned long  aColor
[protected]
 

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

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

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

bool PolygonVersionC::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 PolygonVersionC::isSupported BitmapData::BitmapFormat  aFormat  )  [protected]
 

Checks if a surface format is supported.

void PolygonVersionC::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 PolygonVersionC::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 PolygonVersionC::resetExtents  )  [protected]
 

Resets the fill extents.

void PolygonVersionC::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 PolygonVersionC::mBufferWidth [protected]
 

ClipRectangle PolygonVersionC::mClipRect [protected]
 

SpanExtents* PolygonVersionC::mEdgeExtents [protected]
 

unsigned int PolygonVersionC::mHeight [protected]
 

SUBPIXEL_DATA* PolygonVersionC::mMaskBuffer [protected]
 

MATRIX2D PolygonVersionC::mRemappingMatrix [protected]
 

SpanExtents PolygonVersionC::mVerticalExtents [protected]
 

unsigned int PolygonVersionC::mWidth [protected]
 

NON_ZERO_MASK_DATA_UNIT* PolygonVersionC::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