OmegaEngine API
1.0.3
|
A 2D grid of values that can be stored in PNG files. More...
Public Member Functions | |
T | ClampedRead (int x, int y) |
Reads a value in the grid and automatically clamps out of bound values of x or y . More... | |
void | Save ([NotNull, Localizable(false)] string path) |
Saves the grid to a PNG file. More... | |
void | Save ([NotNull] Stream stream) |
Saves the grid to a PNG stream. More... | |
abstract Bitmap | GenerateBitmap () |
Generates a bitmap representation of the grid. More... | |
Public Attributes | |
int | Width => Data.GetLength(0) |
The width of the grid (number of values along the X axis). More... | |
int | Height => Data.GetLength(1) |
The height of the grid (number of values along the Y axis). More... | |
Protected Member Functions | |
Grid (int width, int height) | |
Creates a new empty grid. More... | |
Grid (T[,] data) | |
Creates a new grid based on an existing array. More... | |
Protected Attributes | |
internal readonly T [,] | Data |
The internal array containing the values. More... | |
Properties | |
virtual T | this[int x, int y] [get, set] |
A 2D grid of values that can be stored in PNG files.
T | The type of values stored in the grid. |
T | : | struct |
|
inlineprotected |
Creates a new empty grid.
width | The width of the grid (number of values along the X axis). |
height | The height of the grid (number of values along the Y axis). |
|
inlineprotected |
Creates a new grid based on an existing array.
data | Used as the internal array (no defensive copy). Do not modify once passing in! |
T OmegaEngine.Values.Grid< T >.ClampedRead | ( | int | x, |
int | y | ||
) |
Reads a value in the grid and automatically clamps out of bound values of x or y .
|
pure virtual |
Generates a bitmap representation of the grid.
Implemented in OmegaEngine.Values.NibbleGrid, OmegaEngine.Values.ByteGrid, and OmegaEngine.Values.ByteVector4Grid.
|
inline |
Saves the grid to a PNG file.
|
inline |
Saves the grid to a PNG stream.
|
protected |
The internal array containing the values.
int OmegaEngine.Values.Grid< T >.Height => Data.GetLength(1) |
The height of the grid (number of values along the Y axis).
int OmegaEngine.Values.Grid< T >.Width => Data.GetLength(0) |
The width of the grid (number of values along the X axis).