Interface ITexture
- Namespace
- Icy.Rendering
- Assembly
- IcyUI.dll
Represents generalized interface for platform texture type adapters.
public interface ITexture : IDisposable
- Inherited Members
- Extension Methods
Properties
Size
Gets the size of a texture.
Size Size { get; }
Property Value
Methods
GetTextureData<TColor>(Rectangle?, TColor[], int, int)
Gets the colors stored in texture, reading data in format represented by TColor struct.
void GetTextureData<TColor>(Rectangle? region, TColor[] buffer, int startIndex, int elementCount) where TColor : struct
Parameters
regionRectangle?The section of the texture where the data will be copied from. null indicates the data will be copied over the entire texture.
bufferTColor[]The array to receive texture data. If
regionis null, the number of elements in the array must be equal to the Size; otherwise, the number of elements in the array should be equal to the size of the rectangle.startIndexintThe index of the element in the array at which to start copying.
elementCountintThe number of elements to copy.
Type Parameters
TColorFormat of colors stored in the texture.
SetTextureData<TColor>(Rectangle?, TColor[], int, int)
Sets the colors data to the specified bounds in texture.
void SetTextureData<TColor>(Rectangle? region, TColor[] buffer, int startIndex, int elementCount) where TColor : struct
Parameters
regionRectangle?The section of the texture where the data will be placed. null indicates the data will be copied over the entire texture.
bufferTColor[]Buffer to read data from.
startIndexintThe index of the element in the array at which to start copying.
elementCountintThe number of elements to copy.
Type Parameters
TColorFormat of colors stored in the texture.