WiresSkin

References
public sealed class WiresSkin : IStorable
The look of every wire. Strokes are set per WireKind, colours per WireGroup: item, list and tree wires always share one set of colours, while empty, disabled and tentative wires each have their own. The glow behind selected wires is one colour for all of them.

Constructors

WiresSkin

#
public WiresSkin(IReader reader)
Deserialisation constructor. Files written before colours were shared hold one full wire skin per kind; those are folded into the groups, taking the shared colours from the item wire.
reader (IReader)

WiresSkin

#
public WiresSkin(WireColours[] colours, Color glow, WireEdges[] edges)
Create a new wire palette.
colours (WireColours[])One entry per WireGroup, in enum order.
glow (Color)The glow behind selected wires of every kind.
edges (WireEdges[])One entry per WireKind, in enum order.

Fields

DefaultDim

#
public static readonly WiresSkin DefaultDim
Gets the default wire properties in dark mode.

DefaultLit

#
public static readonly WiresSkin DefaultLit
Gets the default wire properties in bright mode.

Properties

Glow

#
public Color Glow { get; }
Gets the glow drawn behind a wire with both ends selected, the same for every kind.

Indexers

this[]

#
public WireSkin this[IParameter parameter] { get; }
Gets the wire properties associated with a particular parameter.
parameter (IParameter)

this[]

#
public WireSkin this[WireKind kind] { get; }
Gets the wire properties associated with the given kind.
kind (WireKind)

Methods

Colours

#
public WireColours Colours(WireGroup group)
group (WireGroup)

Edges

#
public WireEdges Edges(WireKind kind)
kind (WireKind)

Fade

#
public WiresSkin Fade(float factor)
Multiply the alpha value colours in this collection with the given factor.
factor (float)Fading factor. 0=fully transparent, 1=no change.
Modified palette.

GroupOf

#
public static WireGroup GroupOf(WireKind kind)
The group a wire kind takes its colours from.
kind (WireKind)

Interpolate

#
public WiresSkin Interpolate(WiresSkin other, float factor)
Interpolate between schemes.
other (WiresSkin)Other scheme.
factor (float)Interpolation factor.
Interpolated scheme.

ResolveKind

#
public static WireKind ResolveKind(IParameter parameter)
Figure out which wire style best applies to a given parameter. Activity is a property of the founding object, so a parameter inside a disabled component counts as disabled even though its own flag never changes.
parameter (IParameter)

ResolveKind

#
public static WireKind ResolveKind(IParameter source, IParameter target)
Figure out which wire style best applies to a given parameter pair. A wire into or out of a disabled object is inert either way, so both ends count.
source (IParameter)
target (IParameter)

Store

#
public void Store(IWriter writer)
writer (IWriter)
Store

With

#
public WiresSkin With(WireKind kind, WireSkin wireSkin)
Modify one of the wires: its strokes, the colours of the group it belongs to, and the shared glow.
kind (WireKind)
wireSkin (WireSkin)

WithColours

#
public WiresSkin WithColours(WireGroup group, WireColours colours)
group (WireGroup)
colours (WireColours)

WithEdges

#
public WiresSkin WithEdges(WireKind kind, WireEdges edges)
kind (WireKind)
edges (WireEdges)

WithGlow

#
public WiresSkin WithGlow(Color glow)
glow (Color)