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

#
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.
public WiresSkin(
reader
)

WiresSkin

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

Fields

DefaultDim

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

DefaultLit

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

Properties

Glow

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

Indexers

this[]

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

this[]

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

Methods

Colours

#
public WireColours Colours(
group
)

Edges

#
public WireEdges Edges()

Fade

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

GroupOf

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

Interpolate

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

ResolveKind

#
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.
public static WireKind ResolveKind(
parameter
)

ResolveKind

#
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.
public static WireKind ResolveKind(
source,
target
)

Store

#
public void Store(
writer
)
Store

With

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

WithColours

#
public WiresSkin WithColours(
group,
colours
)

WithEdges

#
public WiresSkin WithEdges(
kind,
edges
)

WithGlow

#
public WiresSkin WithGlow(
Color
glow
)