GripSkin

References
public sealed class GripSkin : IStorable
Immutable collection of plug skin settings.

Constructors

GripSkin

#
public GripSkin(Color inner, Color outer, float radius)
inner (Color)Colour of grip interior.
outer (Color)Colour of grip exterior.
radius (float)Radius of the whole grip, ring included.

GripSkin

#
public GripSkin(IReader reader)
Deserialization constructor.
reader (IReader)Reader object.

Properties

Inner

#
public Color Inner { get; }
Gets the colour for the grip interior.

InnerRadius

#
public float InnerRadius { get; }
Gets the radius of the inner disc: the radius less the ring, see RingWidth(float).

Outer

#
public Color Outer { get; }
Gets the colour for the grip exterior.

OuterRadius

#
public float OuterRadius { get; }
Gets the width of the ring around the inner disc, see RingWidth(float).

Radius

#
public float Radius { get; }
Gets the radius of the whole grip, ring included.

Methods

Fade

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

IStorable.Store

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

Interpolate

#
public GripSkin Interpolate(GripSkin other, float factor)
Interpolate two grip properties.
other (GripSkin)
factor (float)

RingWidth

#
public static float RingWidth(float radius)
The width of the ring around the inner disc for a grip of the given radius. The ring grows with the grip, but slower: two pixels at the default radius of four, four pixels at radius ten. A fixed width looks like a wire around a large grip; half the radius looks like a hole.
radius (float)