Skip to content

Dimensions

Namespace Nfty.Core.Model in assembly Nfty.Ticket.

public record Dimensions

Canvas size in pixels. Held by the CookBook and the single source of truth for the whole book: every variant image in every nested Recipe is validated against it, so a Set cannot contain two assets of different sizes.

Constructors

Dimensions(int, int)

public Dimensions(int Width, int Height);

Parameters

  • Width (int) - Width in pixels.
  • Height (int) - Height in pixels.

Fields

MaxPixels

public const long MaxPixels = 100000000;

The most pixels a canvas may have, so allocating a raster for one cannot overflow an int or exhaust memory.

Properties

Height

public int Height { get; init; }

Height in pixels.

Width

public int Width { get; init; }

Width in pixels.