GradientGrip

References
[IoId("00000000-F09C-4616-9F59-0CDB195B33C8")] public sealed class GradientGrip : IStorable, IComparable<GradientGrip>, IEquatable<GradientGrip>
Represents a grip in a colour gradient.

Constructors

GradientGrip

#
public GradientGrip(double parameter, Color colour)
Create a new continuous grip.
parameter (double)Grip parameter.
colour (Color)Grip colour.

GradientGrip

#
public GradientGrip(double parameter, Color colourIn, Color colourOut)
Create a new continuous grip.
parameter (double)Grip parameter.
colourIn (Color)Colour going into the left side of the grip.
colourOut (Color)Colour coming out of the right side of the grip.

GradientGrip

#
public GradientGrip(double parameter, Colour colour)
Create a new continuous grip.
parameter (double)Grip parameter.
colour (Colour)Grip colour.

GradientGrip

#
public GradientGrip(double parameter, Colour colourIn, Colour colourOut)
Create a new discontinuous grip.
parameter (double)Grip parameter.
colourIn (Colour)Colour going into the left side of the grip.
colourOut (Colour)Colour coming out of the right side of the grip.

GradientGrip

#
public GradientGrip(IReader reader)
Deserialization constructor.
reader (IReader)Reader to deserialize from.

Properties

Average

#
public Colour Average { get; }
Gets the average grip colour.

Id

#
public Guid Id { get; }
Gets the ID of this grip.

In

#
public Colour In { get; }
Gets the colour going into the left side of this grip.

IsContinuous

#
public bool IsContinuous { get; }
Gets whether this grip is continuous, i.e. if the left colour and right colour are identical.

Out

#
public Colour Out { get; }
Gets the colour coming out of the right side of this grip.

Parameter

#
public double Parameter { get; }
Gets the parameter of this grip.

Methods

Store

#
public void Store(IWriter writer)
This method is called whenever the instance is required to serialize itself.
writer (IWriter)Writer object to serialize with.
Store
Explicit

IComparable<GradientGrip>.CompareTo

#
other (GradientGrip)
Explicit

IEquatable<GradientGrip>.Equals

#
other (GradientGrip)

WithColour

#
public GradientGrip WithColour(Colour newColour)
Create a new grip based on the current grip but with a different colour.
newColour (Colour)New colour value.
Recoloured grip.

WithColour

#
public GradientGrip WithColour(Colour newColourIn, Colour newColourOut)
Create a new grip based on the current grip but with a different colour.
newColourIn (Colour)New colour in value.
newColourOut (Colour)New colour out value.
Recoloured grip.

WithNewId

#
public GradientGrip WithNewId()
Create a new identical grip with a different Id.

WithParameter

#
public GradientGrip WithParameter(double parameter)
Create a new grip based on the current grip but with a new parameter.
parameter (double)New parameter value.
Moved grip.