WireSkin

References
public sealed class WireSkin : IStorable
The look of one kind of wire: colours and strokes. Colours are shared between kinds by WiresSkin; this is the resolved view for a single kind.

Constructors

WireSkin

#
public WireSkin(Color normal, Color selected, Color glow, EdgeDescription outer, EdgeDescription inner = null)
normal (Color)Colour of a wire with no selected end.
selected (Color)Colour of a wire with both ends selected.
glow (Color)Glow behind a wire with both ends selected.
outer (EdgeDescription)Main wire stroke.
inner (EdgeDescription = null)Optional core stroke.

WireSkin

#
public WireSkin(IReader reader)
Deserialisation constructor. Older files also carry an unselected colour, which is ignored.
reader (IReader)

WireSkin

#
public WireSkin(WireColours colours, Color glow, WireEdges edges)
colours (WireColours)
glow (Color)
edges (WireEdges)

Properties

Colours

#
public WireColours Colours { get; }

Edges

#
public WireEdges Edges { get; }

HalfSelected

#
public Color HalfSelected { get; }
Gets the colour at the unselected end of a wire whose other end is selected. This is a fixed blend of the normal and selected colours, not a skin setting.

Inner

#
public EdgeDescription Inner { get; }
Gets the description for the inner edge.

Normal

#
public Color Normal { get; }
Gets the normal wire colour, used when both ends are unselected.

Outer

#
public EdgeDescription Outer { get; }
Gets the description for the outer edge.

Selected

#
public Color Selected { get; }
Gets the colour of a wire with both ends selected, and of the selected end of a wire with one.

SelectedGlow

#
public Color SelectedGlow { get; }
Gets the glow colour for selected wires.

Methods

Fade

#
public WireSkin Fade(float factor)
Fade the wire.
factor (float)Fading factor.
Faded wire.
Explicit

IStorable.Store

#
void IStorable.Store(IWriter writer)
writer (IWriter)
Store

Interpolate

#
public WireSkin Interpolate(WireSkin other, float factor)
Interpolate wire properties.
other (WireSkin)
factor (float)

Modify

#
public WireSkin Modify(Color? normal = null, Color? selected = null, Color? selectedGlow = null, EdgeDescription outerEdge = null, EdgeDescription innerEdge = null)
Modify some wire skin settings. This method has been designed to support named arguments.
normal (Color? = null)
selected (Color? = null)
selectedGlow (Color? = null)
outerEdge (EdgeDescription = null)
innerEdge (EdgeDescription = null)
Modified skin.

ResolveColours

#
public void ResolveColours(bool sourceSelected, bool targetSelected, out Color sourceColour, out Color targetColour)
Resolve the appropriate colours for a wire with specific selected states at both ends.
sourceSelected (bool)Source selection state.
targetSelected (bool)Target selection state.
sourceColour (out Color)Resolved source colour.
targetColour (out Color)Resolved target colour.