Table of Contents

Struct LoadTextureByColors

Namespace
BSGameLib.Game.Textures
Assembly
BSGameLib.Game.dll

Makes a texture from an array of colours, one per pixel, row by row.

public readonly record struct LoadTextureByColors : ITextureParameters, IEquatable<LoadTextureByColors>
Implements
Inherited Members

Constructors

LoadTextureByColors(Color[], int, int, Color?)

Makes a texture from an array of colours, one per pixel, row by row.

public LoadTextureByColors(Color[] Colors, int Width, int Height, Color? ColorKey = null)

Parameters

Colors Color[]

The colours of the pixels.

Width int

The width of the texture, in pixels.

Height int

The height of the texture, in pixels.

ColorKey Color?

The colour made fully transparent, or null to keep the colours as they are.

Properties

ColorKey

The colour made fully transparent, or null to keep the colours as they are.

public Color? ColorKey { get; init; }

Property Value

Color?

Colors

The colours of the pixels.

public Color[] Colors { get; init; }

Property Value

Color[]

Height

The height of the texture, in pixels.

public int Height { get; init; }

Property Value

int

Width

The width of the texture, in pixels.

public int Width { get; init; }

Property Value

int