A table of horizontal scan-line segments - used for rasterising Paths. More...
#include <juce_EdgeTable.h>

Classes | |
| struct | LineItem |
Public Member Functions | |
| EdgeTable (const RectangleList< float > &rectanglesToAdd) | |
| Creates an edge table containing a rectangle list. | |
| EdgeTable (const RectangleList< int > &rectanglesToAdd) | |
| Creates an edge table containing a rectangle list. | |
| EdgeTable (Rectangle< float > rectangleToAdd) | |
| Creates an edge table containing a rectangle. | |
| EdgeTable (Rectangle< int > clipLimits, const Path &pathToAdd, const AffineTransform &transform) | |
| Creates an edge table containing a path. | |
| EdgeTable (Rectangle< int > rectangleToAdd) | |
| Creates an edge table containing a rectangle. | |
| void | clipLineToMask (int x, int y, const uint8 *mask, int maskStride, int numPixels) |
| void | clipToEdgeTable (const EdgeTable &) |
| void | clipToRectangle (Rectangle< int > r) |
| void | excludeRectangle (Rectangle< int > r) |
| const Rectangle< int > & | getMaximumBounds () const noexcept |
| bool | isEmpty () noexcept |
| template<class EdgeTableIterationCallback > | |
| void | iterate (EdgeTableIterationCallback &iterationCallback) const noexcept |
| Iterates the lines in the table, for rendering. | |
| void | multiplyLevels (float factor) |
| Scales all the alpha-levels in the table by the given multiplier. | |
| void | optimiseTable () |
| Reduces the amount of space the table has allocated. | |
| void | translate (float dx, int dy) noexcept |
Private Member Functions | |
| void | addEdgePoint (int x, int y, int winding) |
| void | addEdgePointPair (int x1, int x2, int y, int winding) |
| void | allocate () |
| void | clearLineSizes () noexcept |
| void | clipEdgeTableLineToRange (int *line, int x1, int x2) noexcept |
| void | intersectWithEdgeTableLine (int y, const int *otherLine) |
| void | remapTableForNumEdges (int newNumEdgesPerLine) |
| void | remapWithExtraSpace (int numPointsNeeded) |
| void | sanitiseLevels (bool useNonZeroWinding) noexcept |
Private Attributes | |
| Rectangle< int > | bounds |
| int | lineStrideElements |
| int | maxEdgesPerLine |
| bool | needToCheckEmptiness = true |
| CopyableHeapBlock< int > | table |
Static Private Attributes | |
| static constexpr auto | defaultEdgesPerLine = 32 |
| static constexpr auto | scale = 256 |
A table of horizontal scan-line segments - used for rasterising Paths.
@tags{Graphics}
| juce::EdgeTable::EdgeTable | ( | 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.
| clipLimits | only the region of the path that lies within this area will be added |
| pathToAdd | the path to add to the table |
| transform | a transform to apply to the path being added |
|
explicit |
Creates an edge table containing a rectangle.
Creates an edge table containing a rectangle.
|
explicit |
Creates an edge table containing a rectangle list.
|
explicit |
Creates an edge table containing a rectangle list.
|
private |
|
private |
|
private |
|
privatenoexcept |
|
privatenoexcept |
| void juce::EdgeTable::clipLineToMask | ( | int | x, |
| int | y, | ||
| const uint8 * | mask, | ||
| int | maskStride, | ||
| int | numPixels | ||
| ) |
| void juce::EdgeTable::clipToEdgeTable | ( | const EdgeTable & | ) |
Referenced by juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToEdgeTable(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToImageAlpha(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToPath(), and juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::fillRectWithColourImpl().
| void juce::EdgeTable::clipToRectangle | ( | Rectangle< int > | r | ) |
| void juce::EdgeTable::excludeRectangle | ( | Rectangle< int > | r | ) |
|
inlinenoexcept |
Referenced by juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipRegionIntersects(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToImageAlpha(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToPath(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToRectangleList(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::fillRectWithColourImpl(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::getClipBounds(), and juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::transformedClipImage().
|
private |
|
noexcept |
Referenced by juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToEdgeTable(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToImageAlpha(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToPath(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToRectangle(), juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::clipToRectangleList(), and juce::RenderingHelpers::ClipRegions::EdgeTableRegion< SavedStateType >::excludeClipRectangle().
|
inlinenoexcept |
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.
| iterationCallback | this 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;
|
References juce::isPositiveAndBelow(), and jassert.
| void juce::EdgeTable::multiplyLevels | ( | float | factor | ) |
Scales all the alpha-levels in the table by the given multiplier.
| void juce::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.
|
private |
|
private |
|
privatenoexcept |
|
noexcept |
|
private |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
staticconstexprprivate |
|
private |