JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
juce::EdgeTable Class Reference

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.
 
EdgeTableoperator= (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

@tags{Graphics}

Definition at line 37 of file juce_EdgeTable.h.

Constructor & Destructor Documentation

◆ EdgeTable() [1/6]

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.

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

Definition at line 31 of file juce_EdgeTable.cpp.

◆ EdgeTable() [2/6]

juce::EdgeTable::EdgeTable ( Rectangle< int rectangleToAdd)
explicit

Creates an edge table containing a rectangle.

Definition at line 109 of file juce_EdgeTable.cpp.

◆ EdgeTable() [3/6]

juce::EdgeTable::EdgeTable ( Rectangle< float rectangleToAdd)
explicit

Creates an edge table containing a rectangle.

Definition at line 196 of file juce_EdgeTable.cpp.

◆ EdgeTable() [4/6]

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

Creates an edge table containing a rectangle list.

Definition at line 132 of file juce_EdgeTable.cpp.

◆ EdgeTable() [5/6]

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

Creates an edge table containing a rectangle list.

Definition at line 154 of file juce_EdgeTable.cpp.

◆ EdgeTable() [6/6]

juce::EdgeTable::EdgeTable ( const EdgeTable other)

Creates a copy of another edge table.

Definition at line 272 of file juce_EdgeTable.cpp.

◆ ~EdgeTable()

juce::EdgeTable::~EdgeTable ( )

Destructor.

Definition at line 289 of file juce_EdgeTable.cpp.

Member Function Documentation

◆ clipLineToMask()

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

Definition at line 776 of file juce_EdgeTable.cpp.

◆ clipToEdgeTable()

void juce::EdgeTable::clipToEdgeTable ( const EdgeTable other)

Definition at line 741 of file juce_EdgeTable.cpp.

◆ clipToRectangle()

void juce::EdgeTable::clipToRectangle ( Rectangle< int r)

Definition at line 681 of file juce_EdgeTable.cpp.

◆ excludeRectangle()

void juce::EdgeTable::excludeRectangle ( Rectangle< int r)

Definition at line 720 of file juce_EdgeTable.cpp.

◆ getMaximumBounds()

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

Definition at line 81 of file juce_EdgeTable.h.

◆ isEmpty()

bool juce::EdgeTable::isEmpty ( )
noexcept

Definition at line 820 of file juce_EdgeTable.cpp.

◆ iterate()

void juce::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
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;
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Definition juce_Memory.h:88
(these don't necessarily have to be 'const', but it might help it go faster)

Definition at line 112 of file juce_EdgeTable.h.

◆ multiplyLevels()

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

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

Definition at line 485 of file juce_EdgeTable.cpp.

◆ operator=()

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

Copies from another edge table.

Definition at line 277 of file juce_EdgeTable.cpp.

◆ optimiseTable()

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.

Definition at line 414 of file juce_EdgeTable.cpp.

◆ translate()

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

Definition at line 464 of file juce_EdgeTable.cpp.


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