PictureLimits struct
Namespace: Arlecchino.Pictures · Assembly: Arlecchino.Pictures
What a caller will hold, and what it has a use for. A format that can read itself at a smaller size does so rather than decoding pixels that will never be drawn.
public readonly struct PictureLimits : IEquatable<PictureLimits>
Implements IEquatable<T><PictureLimits>
Constructors
| Member | Summary |
|---|---|
PictureLimits(int, int) | What a caller will hold, and what it has a use for. A format that can read itself at a smaller size does so rather than decoding pixels that will never be drawn. |
Properties
| Member | Summary |
|---|---|
Default | What a caller gets by asking for nothing in particular: the whole picture, within reason. |
EnoughPixels | How many pixels the caller has a use for, or nought for as many as the picture holds. A decoder answers with at least this many where it can; the size it lands on is its own. |
MostPixels | How many pixels may be held at once, refusing anything larger. |
Methods
| Member | Summary |
|---|---|
Deconstruct(out int, out int) | |
For(int) | Limits for a caller that will draw the picture no larger than a given number of pixels. |
Constructors in detail
PictureLimits(int, int)
public PictureLimits(int MostPixels, int EnoughPixels);
What a caller will hold, and what it has a use for. A format that can read itself at a smaller size does so rather than decoding pixels that will never be drawn.
Parameters
| Name | Type | Description |
|---|---|---|
MostPixels | int | How many pixels may be held at once, refusing anything larger. |
EnoughPixels | int | How many pixels the caller has a use for, or nought for as many as the picture holds. A decoder answers with at least this many where it can; the size it lands on is its own. |
Properties in detail
Default
public static PictureLimits Default { get; }
What a caller gets by asking for nothing in particular: the whole picture, within reason.
Type PictureLimits
EnoughPixels
public int EnoughPixels { get; init; }
How many pixels the caller has a use for, or nought for as many as the picture holds. A decoder answers with at least this many where it can; the size it lands on is its own.
Type int
MostPixels
public int MostPixels { get; init; }
How many pixels may be held at once, refusing anything larger.
Type int
Methods in detail
Deconstruct(out int, out int)
public void Deconstruct(out int MostPixels, out int EnoughPixels);
Parameters
| Name | Type | Description |
|---|---|---|
MostPixels | int | |
EnoughPixels | int |
For(int)
public static PictureLimits For(int pixels);
Limits for a caller that will draw the picture no larger than a given number of pixels.
Parameters
| Name | Type | Description |
|---|---|---|
pixels | int | How many pixels the caller has a use for. |
Returns PictureLimits — The limits.