Blaze.DistanceCacheSquare Class Reference

Detailed Description

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< DistanceCachePointPoints =new List<DistanceCachePoint>()
 All the points in this square. More...
 

Constructor & Destructor Documentation

Blaze.DistanceCacheSquare.DistanceCacheSquare ( int  x,
int  y,
int  index 
)
inlinepackage

Member Function Documentation

void Blaze.DistanceCacheSquare.Add ( float  x,
float  y 
)
inlinepackage

Adds the given glyph outline point to this square.

void Blaze.DistanceCacheSquare.Clear ( )
inlinepackage

Clears this square.

void Blaze.DistanceCacheSquare.RecalculateIndex ( Scanner  scanner)
inlinepackage
void Blaze.DistanceCacheSquare.Setup ( Scanner  scanner)
inlinepackage

Called just after the whole grid has been created.

Member Data Documentation

int Blaze.DistanceCacheSquare.Count
package

Points in this cache square.

int Blaze.DistanceCacheSquare.Index
package

Array-level index of this cell in the grid.

bool Blaze.DistanceCacheSquare.InRange
package

True if this square contains points or is in range of one that does.

int Blaze.DistanceCacheSquare.PixelIndexX
package

The x index of the pixel in the bottom left corner of this square.

int Blaze.DistanceCacheSquare.PixelIndexY
package

The y index of the pixel in the bottom left corner of this square.

List<DistanceCachePoint> Blaze.DistanceCacheSquare.Points =new List<DistanceCachePoint>()
package

All the points in this square.

DistanceCacheSquare [] Blaze.DistanceCacheSquare.SearchSet
package

A set of cache squares (including this one) which should be searched when running proximity tests from within this square.

int Blaze.DistanceCacheSquare.X
package

X coordinate of this cell in the distance grid.

float Blaze.DistanceCacheSquare.XOffset
package

X as a float, multiplied by BlurSpread

int Blaze.DistanceCacheSquare.Y
package

Y coordinate of this cell in the distance grid.

float Blaze.DistanceCacheSquare.YOffset
package

Y as a float, multiplied by BlurSpread