GH_Grip

References
Represents a grip in a gradient. A grip defines both where and how the colour of a gradient changes.

Constructors

GH_Grip

#
public GH_Grip()

GH_Grip

#
public GH_Grip(double parameter, Color colour)
parameter (double)
colour (Color)

GH_Grip

#
public GH_Grip(double parameter, Color colourLeft, Color colourRight)
parameter (double)
colourLeft (Color)
colourRight (Color)

GH_Grip

#
public GH_Grip(GH_Grip other)
other (GH_Grip)

Properties

ColourLeft

#
public Color ColourLeft { get; set; }
Gets the colour to the left of this grip.

ColourRight

#
public Color ColourRight { get; set; }
Gets the colour to the right of this grip.

GripId

#
public Guid GripId { get; }
Gets the Grip ID.

IsValid

#
public bool IsValid { get; }
Gets whether this grip is valid. A valid grip must have a non-empty Id and a non-NaN parameter.

Parameter

#
public double Parameter { get; set; }
Gets or sets the numeric parameter of the grip.

Selected

#
public bool Selected { get; set; }
Gets or sets whether this grip is selected. Selection state is not (de)serialized.

Type

#
public GH_GripType Type { get; }
Gets whether the colour across this grip is smooth.

Methods

Blend

#
public static Color Blend(Color A, Color B, double t)
A (Color)
B (Color)
t (double)

CompareTo

#
public int CompareTo(GH_Grip other)
other (GH_Grip)

MutateId

#
public void MutateId()
Create a new grip ID.

Read

#
public bool Read(GH_IReader reader)
reader (GH_IReader)
Read

Write

#
public bool Write(GH_IWriter writer)
writer (GH_IWriter)
Write