Table of Contents

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

Size

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

region Rectangle?

The section of the texture where the data will be copied from. null indicates the data will be copied over the entire texture.

buffer TColor[]

The array to receive texture data. If region is 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.

startIndex int

The index of the element in the array at which to start copying.

elementCount int

The number of elements to copy.

Type Parameters

TColor

Format 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

region Rectangle?

The section of the texture where the data will be placed. null indicates the data will be copied over the entire texture.

buffer TColor[]

Buffer to read data from.

startIndex int

The index of the element in the array at which to start copying.

elementCount int

The number of elements to copy.

Type Parameters

TColor

Format of colors stored in the texture.