Constructors
Properties
Indexers
Methods
Adds a copy of this gradient to the shared Grasshopper preset collection.
void AddCurrentAsPreset()
AddGrip
#Add a new single-colour grip.
AddGrip
#Add a new bi-colour grip.
AddGrip
#Add a new grip to the gradient. The colour of the grip will be picked so that there is no difference to the gradient, though this is not actually possible when the interpolation mode is not linear.
AddGrip
#Add a new grip to the gradient. This method does not raise the GradientChanged event, so you need to do that yourself by calling OnGradientChanged().
Removes the preset at the given index from the shared Grasshopper preset collection.
DisplayGradientEditor
#public void DisplayGradientEditor()
EarthlyBrown
#Forest
#Returns the shared Grasshopper gradient presets as color stop collections. Reads the same [grasshopper_gradients] settings database used by the Gradient component.
GreyScale
#Heat
#MouseDown
#Begin grip drag operation.
public bool MouseDown()
dest,
Destination rectangle of the gradient.
PointF
pt
Mouse position in destination coordinates.
Returns: True if a grip drag was started, false otherwise.
MouseMove
#Continue grip dragging operation.
public bool MouseMove()
dest,
Destination rectangle of gradient.
PointF
pt
Mouse position in destination coordinates.
Returns: True if a grip position was changed, false otherwise. Redraws are only required on TRUE.
MouseUp
#Terminate grip drag.
public bool MouseUp()
dest,
Destination rectangle of gradient
PointF
pt,
Mouse location in destination coordinates
deselect
NearestGrip
#Find the nearest grip in screen coordinates.
public int NearestGrip()
dest,
Retangle that contains the entire gradient.
PointF
pt,
Point to search from.
maxRadius
Maximum distance between point and grip.
Returns: The grip closest to the point.
NormalizeGrips
#Normalize all grips. This will scale all grip parameters so that the full gradient extend equals 0~1.
public void NormalizeGrips()
OnGradientChangedIntermediate
#Raise the GradientChanged event.
public void OnGradientChangedIntermediate()
Render_Background
#Render_Gradient
#Render_Grips
#Stores the given color stops as the shared Grasshopper default gradient.