Struct LoadTextureByColors
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
ColorsColor[]The colours of the pixels.
WidthintThe width of the texture, in pixels.
HeightintThe height of the texture, in pixels.
ColorKeyColor?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
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
Width
The width of the texture, in pixels.
public int Width { get; init; }