PolygonVersionF Class Reference

Version F of the polygon filler. Similar to E, but does the rendering one scanline at a time. More...

#include <PolygonVersionF.h>

Inheritance diagram for PolygonVersionF:

PolygonFiller Renderer List of all members.

Public Member Functions

 PolygonVersionF ()
 Constructor.
bool init (unsigned int aWidth, unsigned int aHeight, unsigned int aEdgeCount)
 Initializer.
virtual ~PolygonVersionF ()
 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.
bool addEdge (const PolygonEdge &aEdge)
 Adds an edge.
void renderEvenOddEdges (PolygonScanEdge *&aActiveEdgeTable, SpanExtents &aEdgeExtents, int aCurrentLine)
 Renders the edges from the current vertical index using even-odd fill.
void fillEvenOdd (BitmapData *aTarget, unsigned long aColor)
 Renders the mask to the canvas with even-odd fill.
void renderNonZeroEdges (PolygonScanEdge *&aActiveEdgeTable, SpanExtents &aEdgeExtents, int aCurrentLine)
 Renders the edges from the current vertical index using 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.
bool resizeEdgeStorage (int aIncrement)
 Resizes the edge storage.
int getFreeEdgeCount ()
 Returns the amount of free edges in the edge storage.

Protected Attributes

SUBPIXEL_DATA * mMaskBuffer
NonZeroMaskmWindingBuffer
SpanExtents mVerticalExtents
PolygonScanEdge ** mEdgeTable
PolygonScanEdgemEdgeStorage
unsigned int mEdgeCount
unsigned int mCurrentEdge
unsigned int mWidth
unsigned int mBufferWidth
unsigned int mHeight
ClipRectangle mClipRect
MATRIX2D mRemappingMatrix

Detailed Description

Version F of the polygon filler. Similar to E, but does the rendering one scanline at a time.


Constructor & Destructor Documentation

PolygonVersionF::PolygonVersionF  ) 
 

Constructor.

PolygonVersionF::~PolygonVersionF  )  [virtual]
 

Virtual destructor.


Member Function Documentation

bool PolygonVersionF::addEdge const PolygonEdge aEdge  )  [protected]
 

Adds an edge.

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

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

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

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

int PolygonVersionF::getFreeEdgeCount  )  [inline, protected]
 

Returns the amount of free edges in the edge storage.

bool PolygonVersionF::init unsigned int  aWidth,
unsigned int  aHeight,
unsigned int  aEdgeCount
 

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. aEdgeCount defines the initial amount of edges available for rendering.

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

Checks if a surface format is supported.

void PolygonVersionF::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 PolygonVersionF::renderEvenOddEdges PolygonScanEdge *&  aActiveEdgeTable,
SpanExtents aEdgeExtents,
int  aCurrentLine
[inline, protected]
 

Renders the edges from the current vertical index using even-odd fill.

void PolygonVersionF::renderNonZeroEdges PolygonScanEdge *&  aActiveEdgeTable,
SpanExtents aEdgeExtents,
int  aCurrentLine
[inline, protected]
 

Renders the edges from the current vertical index using non-zero winding fill.

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

Resets the fill extents.

bool PolygonVersionF::resizeEdgeStorage int  aIncrement  )  [protected]
 

Resizes the edge storage.

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

ClipRectangle PolygonVersionF::mClipRect [protected]
 

unsigned int PolygonVersionF::mCurrentEdge [protected]
 

unsigned int PolygonVersionF::mEdgeCount [protected]
 

PolygonScanEdge* PolygonVersionF::mEdgeStorage [protected]
 

PolygonScanEdge** PolygonVersionF::mEdgeTable [protected]
 

unsigned int PolygonVersionF::mHeight [protected]
 

SUBPIXEL_DATA* PolygonVersionF::mMaskBuffer [protected]
 

MATRIX2D PolygonVersionF::mRemappingMatrix [protected]
 

SpanExtents PolygonVersionF::mVerticalExtents [protected]
 

unsigned int PolygonVersionF::mWidth [protected]
 

NonZeroMask* PolygonVersionF::mWindingBuffer [protected]
 


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