Catlike Coding
Unity Code Documentation
|
Container for NumberFlow pixel input data. More...
Public Member Functions | |
DiagramPixels () | |
Initialize a new instance. There is no reason to do this yourself. More... | |
DiagramPixels (DiagramPixels pixels) | |
Initializes a new instance as a copy of another. There is no reason to do this yourself. More... | |
void | Init (int width, int height, Color[] colors) |
Initialize a Color array, representing a pixel grid. More... | |
void | Init (int size, Color[] colors) |
Initialize a Color array, representing a square pixel grid. More... | |
Public Attributes | |
Color[] | colors |
Color array to use instead of the texture. More... | |
int | height |
Height, used for the Color array. More... | |
Texture2D | texture |
Texture2D that will be used, unless colors are provided. More... | |
int | width |
Width, used for the Color array. More... | |
Container for NumberFlow pixel input data.
Can be used to reference a Texture2D, or a Color array at runtime.
Colors will be used when the array is not null and both width and height are larger than zero. Otherwise it will fall back to the texture, if any.
CatlikeCoding.NumberFlow.DiagramPixels.DiagramPixels | ( | ) |
Initialize a new instance. There is no reason to do this yourself.
CatlikeCoding.NumberFlow.DiagramPixels.DiagramPixels | ( | DiagramPixels | pixels | ) |
Initializes a new instance as a copy of another. There is no reason to do this yourself.
pixels | DiagramPixels instance to copy. |
void CatlikeCoding.NumberFlow.DiagramPixels.Init | ( | int | width, |
int | height, | ||
Color[] | colors | ||
) |
Initialize a Color array, representing a pixel grid.
The Color array length should be width * height.
width | Width. |
height | Height. |
colors | Colors. |
void CatlikeCoding.NumberFlow.DiagramPixels.Init | ( | int | size, |
Color[] | colors | ||
) |
Initialize a Color array, representing a square pixel grid.
Sets both width and height to size. The Color array length should be size squared.
size | Size, to use for both width and height. |
colors | Colors. |
Color [] CatlikeCoding.NumberFlow.DiagramPixels.colors |
Color array to use instead of the texture.
Its length should be width * height.
int CatlikeCoding.NumberFlow.DiagramPixels.height |
Height, used for the Color array.
Texture2D CatlikeCoding.NumberFlow.DiagramPixels.texture |
Texture2D that will be used, unless colors are provided.
int CatlikeCoding.NumberFlow.DiagramPixels.width |
Width, used for the Color array.