JUCE: EdgeTable Class Reference

JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Member Functions | List of all members
EdgeTable Class Reference
juce_graphics » geometry

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

`#include <juce_EdgeTable.h>`

## Public Member Functions
| 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.
| EdgeTable (Rectangle< float > rectangleToAdd)
| Creates an edge table containing a rectangle.
| EdgeTable (const RectangleList< int > &rectanglesToAdd)
| Creates an edge table containing a rectangle list.
| EdgeTable (const RectangleList< float > &rectanglesToAdd)
| Creates an edge table containing a rectangle list.
| EdgeTable (const EdgeTable &)
| Creates a copy of another edge table.
EdgeTable & | operator= (const EdgeTable &)
| Copies from another edge table.
| ~EdgeTable ()
| Destructor.
void | clipToRectangle (Rectangle< int > r)
void | excludeRectangle (Rectangle< int > r)
void | clipToEdgeTable (const EdgeTable &)
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 | 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.
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() [1/6]

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.

Parameters

  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

## ◆ EdgeTable() [2/6]

EdgeTable::EdgeTable | ( | Rectangle< int > | rectangleToAdd | ) |
| explicit

Creates an edge table containing a rectangle.

## ◆ EdgeTable() [3/6]

EdgeTable::EdgeTable | ( | Rectangle< float > | rectangleToAdd | ) |
| explicit

Creates an edge table containing a rectangle.

## ◆ EdgeTable() [4/6]

EdgeTable::EdgeTable | ( | const RectangleList< int > & | rectanglesToAdd | ) |
| explicit

Creates an edge table containing a rectangle list.

## ◆ EdgeTable() [5/6]

EdgeTable::EdgeTable | ( | const RectangleList< float > & | rectanglesToAdd | ) |
| explicit

Creates an edge table containing a rectangle list.

## ◆ EdgeTable() [6/6]

EdgeTable::EdgeTable | ( | const EdgeTable & |  | ) |

Creates a copy of another edge table.

## ◆ ~EdgeTable()

EdgeTable::~EdgeTable | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ operator=()

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

Copies from another edge table.

## ◆ clipToRectangle()

void EdgeTable::clipToRectangle | ( | Rectangle< int > | r | ) |

## ◆ excludeRectangle()

void EdgeTable::excludeRectangle | ( | Rectangle< int > | r | ) |

## ◆ clipToEdgeTable()

void EdgeTable::clipToEdgeTable | ( | const EdgeTable & |  | ) |

## ◆ clipLineToMask()

void EdgeTable::clipLineToMask | ( | int | x,
|  | int | y,
|  | const uint8 * | mask,
|  | int | maskStride,
|  | int | numPixels
| ) |  |

## ◆ isEmpty()

bool EdgeTable::isEmpty | ( |  | ) |
| noexcept

## ◆ getMaximumBounds()

const Rectangle< int > & EdgeTable::getMaximumBounds | ( |  | ) | const
| noexcept

## ◆ translate()

void EdgeTable::translate | ( | float | dx,
|  | int | dy
| ) |  |
| noexcept

## ◆ multiplyLevels()

void EdgeTable::multiplyLevels | ( | float | factor | ) |

Scales all the alpha-levels in the table by the given multiplier.

## ◆ optimiseTable()

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.

## ◆ iterate()

template<class EdgeTableIterationCallback >

void EdgeTable::iterate | ( | EdgeTableIterationCallback & | iterationCallback | ) | const
| noexcept

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

  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; x float x Definition juce_UnityPluginInterface.h:192 y float float y Definition juce_UnityPluginInterface.h:192 (these don't necessarily have to be 'const', but it might help it go faster)

References isPositiveAndBelow(), jassert, table, x, and y.

The documentation for this class was generated from the following file:

- juce_EdgeTable.h