Skip to content

PartialAlphaException

Namespace Nfty.Model in assembly Nfty.Model.

public sealed class PartialAlphaException : InvalidOperationException

A picture with a partly transparent pixel cannot be risen. It is refused by name rather than thresholded: silently rounding would give a model whose silhouette nobody drew — at the scale of one item, the "half the models are malformed" outcome the Rise spec forbids.

Constructors

PartialAlphaException(string, int, int, byte, int)

public PartialAlphaException(string itemName, int x, int y, byte alpha, int count);

Creates the exception.

Parameters

  • itemName (string) - What was being risen, as a person would name it.
  • x (int) - Column of the first partial pixel, row-major.
  • y (int) - Row of the first partial pixel.
  • alpha (byte) - That pixel's alpha.
  • count (int) - How many partial pixels the picture has.

Properties

Alpha

public byte Alpha { get; }

That pixel's alpha, 1..254.

Count

public int Count { get; }

How many partial pixels the picture has.

ItemName

public string ItemName { get; }

What was being risen.

X

public int X { get; }

Column of the first partial pixel.

Y

public int Y { get; }

Row of the first partial pixel.