Public Member Functions

EdgeTable Class Reference

A table of horizontal scan-line segments - used for rasterising Paths. More...

List of all members.

Public Member Functions

 EdgeTable (const Rectangle< int > &clipLimits, const Path &pathToAdd, const AffineTransform &transform)
 Creates an edge table containing a path.
 EdgeTable (const Rectangle< int > &rectangleToAdd)
 Creates an edge table containing a rectangle.
 EdgeTable (const RectangleList &rectanglesToAdd)
 Creates an edge table containing a rectangle list.
 EdgeTable (const Rectangle< float > &rectangleToAdd)
 Creates an edge table containing a rectangle.
 EdgeTable (const EdgeTable &other)
 Creates a copy of another edge table.
EdgeTableoperator= (const EdgeTable &other)
 Copies from another edge table.
 ~EdgeTable ()
 Destructor.
void clipToRectangle (const Rectangle< int > &r)
void excludeRectangle (const Rectangle< int > &r)
void clipToEdgeTable (const EdgeTable &other)
void clipLineToMask (int x, int y, const uint8 *mask, int maskStride, int numPixels)
bool isEmpty () noexcept
const Rectangle< int > & getMaximumBounds () const noexcept
void translate (float dx, int dy) noexcept
void optimiseTable ()
 Reduces the amount of space the table has allocated.
template<class EdgeTableIterationCallback >
void iterate (EdgeTableIterationCallback &iterationCallback) const noexcept
 Iterates the lines in the table, for rendering.

Detailed Description

A table of horizontal scan-line segments - used for rasterising Paths.

See also:
Path, Graphics

Constructor & Destructor Documentation

EdgeTable::EdgeTable ( const Rectangle< int > &  clipLimits,
const Path pathToAdd,
const AffineTransform transform 
)

Creates an edge table containing a path.

A table is created with a fixed vertical range, and only sections of the path which lie within this range will be added to the table.

Parameters:
clipLimitsonly the region of the path that lies within this area will be added
pathToAddthe path to add to the table
transforma transform to apply to the path being added
EdgeTable::EdgeTable ( const Rectangle< int > &  rectangleToAdd )

Creates an edge table containing a rectangle.

EdgeTable::EdgeTable ( const RectangleList rectanglesToAdd )

Creates an edge table containing a rectangle list.

EdgeTable::EdgeTable ( const Rectangle< float > &  rectangleToAdd )

Creates an edge table containing a rectangle.

EdgeTable::EdgeTable ( const EdgeTable other )

Creates a copy of another edge table.

EdgeTable::~EdgeTable (  )

Destructor.


Member Function Documentation

EdgeTable& EdgeTable::operator= ( const EdgeTable other )

Copies from another edge table.

void EdgeTable::clipToRectangle ( const Rectangle< int > &  r )
void EdgeTable::excludeRectangle ( const Rectangle< int > &  r )
void EdgeTable::clipToEdgeTable ( const EdgeTable other )
void EdgeTable::clipLineToMask ( int  x,
int  y,
const uint8 mask,
int  maskStride,
int  numPixels 
)
bool EdgeTable::isEmpty (  )
const Rectangle<int>& EdgeTable::getMaximumBounds (  ) const
void EdgeTable::translate ( float  dx,
int  dy 
)
void EdgeTable::optimiseTable (  )

Reduces the amount of space the table has allocated.

This will shrink the table down to use as little memory as possible - useful for read-only tables that get stored and re-used for rendering.

template<class EdgeTableIterationCallback >
void EdgeTable::iterate ( EdgeTableIterationCallback &  iterationCallback ) const

Iterates the lines in the table, for rendering.

This function will iterate each line in the table, and call a user-defined class to render each pixel or continuous line of pixels that the table contains.

Parameters:
iterationCallbackthis templated class must contain the following methods:

                                        inline void setEdgeTableYPos (int y);
                                        inline void handleEdgeTablePixel (int x, int alphaLevel) const;
                                        inline void handleEdgeTablePixelFull (int x) const;
                                        inline void handleEdgeTableLine (int x, int width, int alphaLevel) const;
                                        inline void handleEdgeTableLineFull (int x, int width) const;

(these don't necessarily have to be 'const', but it might help it go faster)

References isPositiveAndBelow(), and jassert.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines