A 2D grid of nibble (half a byte / 4 bits) values that can be stored in 16 colors PNG files.
More...
|
| NibbleGrid (int width, int height) |
|
| NibbleGrid ([NotNull] byte[,] data) |
|
override unsafe Bitmap | GenerateBitmap () |
| Generates a bitmap representation of the grid.
|
|
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...
|
|
|
override byte | this[int x, int y] [get, set] |
| Gets or sets a value in the grid. More...
|
|
virtual T | this[int x, int y] [get, set] |
|
|
int | Width |
| The width of the grid (number of values along the X axis). More...
|
|
int | Height |
| The height of the grid (number of values along the Y axis). More...
|
|
| Grid (int width, int height) |
| Creates a new empty grid. More...
|
|
| Grid (T[,] data) |
| Creates a new grid based on an existing array. More...
|
|
internal readonly T [,] | Data |
| The internal array containing the values. More...
|
|
A 2D grid of nibble (half a byte / 4 bits) values that can be stored in 16 colors PNG files.
◆ Load()
static NibbleGrid OmegaEngine.Values.NibbleGrid.Load |
( |
[NotNull] Stream |
stream | ) |
|
|
inlinestatic |
Loads a grid from a PNG stream.
- Exceptions
-
ArgumentOutOfRangeException | Any of the colors in the imag is not part of the classic 16 colors palette. |
◆ this[int x, int y]
override byte OmegaEngine.Values.NibbleGrid.this[int x, int y] |
|
getset |
Gets or sets a value in the grid.
- Exceptions
-
IndexOutOfRangeException | x or y are out of bounds. |
ArgumentOutOfRangeException | A value larger than 15 is set. |
The documentation for this class was generated from the following file:
- OmegaEngine/Values/NibbleGrid.cs