StackPick¶
Namespace Nfty.Model in assembly Nfty.Model.
One present layer of a selection: its ingredient, the variant chosen, and the color it rolled (null for the stored pixels).
Constructors¶
StackPick(string, string, RolledColor?)¶
Parameters
IngredientId(string) - The layer's ingredient id.VariantId(string) - The chosen variant id.Color(RolledColor?) - The rolled hue and saturation, or null to use the stored pixels.
Properties¶
Color¶
The rolled hue and saturation, or null to use the stored pixels.
IngredientId¶
The layer's ingredient id.
VariantId¶
The chosen variant id.
Methods¶
WithColors(IReadOnlyList<(string, string)>, IReadOnlyList<LayerColor>)¶
public static IReadOnlyList<StackPick> WithColors(IReadOnlyList<(string, string)> present, IReadOnlyList<LayerColor> colors);
Attaches recorded colors to a selection.
Parameters
present(IReadOnlyList<(string, string)>) - The present layers in paint order.colors(IReadOnlyList<LayerColor>) - Recorded per-layer colors;LayerColor.Layeris the ingredient id.
Returns. The picks; a color is set only when both H and S were recorded. The unrounded LayerColor.ExactH/LayerColor.ExactS win, so the model is the cook's own to the bit. A Set cooked before they existed has only the rounded H (0.1 degree) and S (0.001): that fallback is within 1 LSB of an 8-bit channel, not byte-identical.
Operators¶
op_Implicit((string, string))¶
A pick with no color from an (ingredient, variant) pair.
Parameters
t((string, string)) - The pair.
Returns. The pick.