Interface ITexture
- Namespace
- SimulationFramework.Drawing
- Assembly
- SimulationFramework.dll
A 2D bitmap used for rendering. Textures can be created using CreateTexture(int, int, TextureOptions) or loaded using LoadTexture(string, TextureOptions).
public interface ITexture : IDisposable
- Inherited Members
- Extension Methods
Properties
Height
The height of the texture, in pixels.
int Height { get; }
Property Value
Pixels
A span of colors making up texture's data
If changes are made to the texture's data, they may not be applied until ApplyChanges() is called.
Span<Color> Pixels { get; }
Property Value
Width
The width of the texture, in pixels.
int Width { get; }
Property Value
Methods
ApplyChanges()
Applies any cpu-side changes made do the bitmap's data using Pixels or GetPixel(int, int).
void ApplyChanges()
GetCanvas()
Gets a canvas which draws to this texture.
ICanvas GetCanvas()
Returns
GetPixel(int, int)
Gets a reference to the element of Pixels at the provided x
and y
coordinates.
If changes are made to the texture's data, they may not be applied until ApplyChanges() is called.
ref Color GetPixel(int x, int y)