Skip to main content

Raster class

Namespace: Arlecchino.Pictures · Assembly: Arlecchino.Pictures

What a picture turned out to hold, ready to be handed to a widget that draws pixels.

public sealed class Raster : IEquatable<Raster>

Implements IEquatable<T><Raster>

Constructors

MemberSummary
Raster(Rgb[], int, int)What a picture turned out to hold, ready to be handed to a widget that draws pixels.

Properties

MemberSummary
HeightHow tall it is.
PixelsThe pixels, row by row from the top left.
WidthHow wide it is.

Methods

MemberSummary
Deconstruct(out Rgb[], out int, out int)

Constructors in detail

Raster(Rgb[], int, int)

public Raster(Rgb[] Pixels, int Width, int Height);

What a picture turned out to hold, ready to be handed to a widget that draws pixels.

Parameters

NameTypeDescription
PixelsRgb[]The pixels, row by row from the top left.
WidthintHow wide it is.
HeightintHow tall it is.

Properties in detail

Height

public int Height { get; init; }

How tall it is.

Type int

Pixels

public Rgb[] Pixels { get; init; }

The pixels, row by row from the top left.

Type Rgb[]

Width

public int Width { get; init; }

How wide it is.

Type int

Methods in detail

Deconstruct(out Rgb[], out int, out int)

public void Deconstruct(out Rgb[] Pixels, out int Width, out int Height);

Parameters

NameTypeDescription
PixelsRgb[]
Widthint
Heightint