Skip to content

GrayPixel

Namespace Nfty.Core.Editing in assembly Nfty.Core.

public readonly struct GrayPixel : IEquatable<GrayPixel>

One pixel of a ValueMap: a single grayscale value plus an alpha. This is what keeps the value-map's guarantee true now that the paint stack is generic — a command painting a value-map can only ever hand it a GrayPixel, and a GrayPixel has nowhere to put independent R/G/B. The guarantee is a property of the type, not of the care each command takes.

Constructors

GrayPixel(byte, byte)

public GrayPixel(byte Value, byte Alpha);

Parameters

  • Value (byte) - Grayscale value, 0-255; written to R, G and B alike on export.
  • Alpha (byte) - Alpha, 0-255.

Properties

Alpha

public byte Alpha { get; init; }

Alpha, 0-255.

Value

public byte Value { get; init; }

Grayscale value, 0-255; written to R, G and B alike on export.