Each glyph is first broken down into nodes around it's edge (about 50 on average). These nodes are then added into a block of cells in a grid, aka distance cache squares, which they are "in range" of. Each output pixel then checks which of the nodes in the cell it's in is the nearest, and then bases its final colour from that.
Package Functions | |
DistanceCacheSquare (int x, int y, int index) | |
void | Setup (Scanner scanner) |
Called just after the whole grid has been created. More... | |
void | RecalculateIndex (Scanner scanner) |
void | Clear () |
Clears this square. More... | |
void | Add (float x, float y) |
Adds the given glyph outline point to this square. More... | |
Package Attributes | |
int | X |
X coordinate of this cell in the distance grid. More... | |
int | Y |
Y coordinate of this cell in the distance grid. More... | |
int | Index |
Array-level index of this cell in the grid. More... | |
int | Count |
Points in this cache square. More... | |
float | XOffset |
X as a float, multiplied by BlurSpread More... | |
float | YOffset |
Y as a float, multiplied by BlurSpread More... | |
bool | InRange |
True if this square contains points or is in range of one that does. More... | |
int | PixelIndexX |
The x index of the pixel in the bottom left corner of this square. More... | |
int | PixelIndexY |
The y index of the pixel in the bottom left corner of this square. More... | |
DistanceCacheSquare[] | SearchSet |
A set of cache squares (including this one) which should be searched when running proximity tests from within this square. More... | |
List< DistanceCachePoint > | Points =new List<DistanceCachePoint>() |
All the points in this square. More... | |
|
inlinepackage |
|
inlinepackage |
Adds the given glyph outline point to this square.
|
inlinepackage |
Clears this square.
|
inlinepackage |
|
inlinepackage |
Called just after the whole grid has been created.
|
package |
Points in this cache square.
|
package |
Array-level index of this cell in the grid.
|
package |
True if this square contains points or is in range of one that does.
|
package |
The x index of the pixel in the bottom left corner of this square.
|
package |
The y index of the pixel in the bottom left corner of this square.
|
package |
All the points in this square.
|
package |
A set of cache squares (including this one) which should be searched when running proximity tests from within this square.
|
package |
X coordinate of this cell in the distance grid.
|
package |
X as a float, multiplied by BlurSpread
|
package |
Y coordinate of this cell in the distance grid.
|
package |
Y as a float, multiplied by BlurSpread