Class TextureBitmapRgba32
Represents a backend-neutral RGBA bitmap that hosts can upload as a texture resource.
public sealed class TextureBitmapRgba32
- Inheritance
-
TextureBitmapRgba32
- Inherited Members
Constructors
TextureBitmapRgba32(int, int, ColorRgba32[])
Creates a bitmap from packed row-major pixel data.
public TextureBitmapRgba32(int width, int height, ColorRgba32[] pixels)
Parameters
widthintThe bitmap width in pixels.
heightintThe bitmap height in pixels.
pixelsColorRgba32[]The packed row-major pixels.
Properties
Height
Gets the bitmap height in pixels.
public int Height { get; }
Property Value
Pixels
Gets the packed row-major pixels.
public ReadOnlySpan<ColorRgba32> Pixels { get; }
Property Value
Width
Gets the bitmap width in pixels.
public int Width { get; }
Property Value
Methods
GetPixel(int, int)
Gets the color at a pixel position.
public ColorRgba32 GetPixel(int x, int y)
Parameters
Returns
- ColorRgba32
The pixel color.