GH_ColourWheelState

References
Represents the 12 grips that are part of a colour wheel.

Constructors

GH_ColourWheelState

#
public GH_ColourWheelState()

GH_ColourWheelState

#
public GH_ColourWheelState(GH_ColourWheelState other)
other (GH_ColourWheelState)

Fields

ComplementaryAngle

#
public const int ComplementaryAngle = 180

MainGripRadius

#
public const int MainGripRadius = 6

RailStartAngle

#
public const int RailStartAngle = 15

RangeGripRadius

#
public const int RangeGripRadius = 4

TetradAngle

#
public const int TetradAngle = 90

TriadAngle

#
public const int TriadAngle = 120

Properties

Dragging

#
public bool Dragging { get; }
Gets a value indicating whether a dragging operation is currently in progress.

LuminanceMax

#
public double LuminanceMax { get; set; }

LuminanceMin

#
public double LuminanceMin { get; set; }

LuminanceRail

#
public Arc LuminanceRail { get; }
Gets the arc that describes the luminance rail.

SaturationMax

#
public double SaturationMax { get; set; }

SaturationMin

#
public double SaturationMin { get; set; }

SaturationRail

#
public Arc SaturationRail { get; }
Gets the arc that describes the saturation rail.

Style

#
public GH_ColourWheelStyle Style { get; set; }
Gets or sets the style of the colour wheel.

Wheel

#
public Circle Wheel { get; set; }
Gets or sets the wheel boundary.

Methods

BeginGripDrag

#
public bool BeginGripDrag(Point3d cursor)
Potentially start a new grip drag.
cursor (Point3d)Location of cursor in wheel coordinates.
True if the cursor was near enough a grip to initiate a drag operation.

BeginGripDrag

#
public bool BeginGripDrag(PointF cursor)
Potentially start a new grip drag.
cursor (PointF)Location of cursor in wheel coordinates.
True if the cursor was near enough a grip to initiate a drag operation.

ContinueGripDrag

#
public bool ContinueGripDrag(Point3d cursor)
If BeginGrip(3)rag returned true, call this method on subsequent mousemoves.
cursor (Point3d)Location of cursor in wheel coordinates.
True if the drag resulted in a change.

ContinueGripDrag

#
public bool ContinueGripDrag(PointF cursor)
If BeginGrip(3)rag returned true, call this method on subsequent mousemoves.
cursor (PointF)Location of cursor in wheel coordinates.
True if the drag resulted in a change.

CreatePalette

#
public List<Color> CreatePalette(int seed, int count)
Generate a colour palette based on the current state.
seed (int)Random seed for palette.
count (int)Number of colours to include in the palette.
Colour palette (unordered)

EndGripDrag

#
public void EndGripDrag()
Terminate a grip drag, this usually happens on mouseup.

GetGrip

#
public Point3d GetGrip(GH_ColourWheelGrip grip)
Gets the location of a grip of the colour wheel. Grips will be returned irrespective of style.
grip (GH_ColourWheelGrip)Grip to get. Main grips will be on the wheel, range grips slightly on the inside.
Point on the colour wheel.

GripAtPoint

#
public GH_ColourWheelGrip GripAtPoint(Point3d point)
Find the grip near a point.
point (Point3d)Location of point in wheel coordinates.
Grip closest to location or GH_ColourWheelGrip.NoGrip if no grip was near the point.

GripAtPoint

#
public GH_ColourWheelGrip GripAtPoint(PointF point)
Find the grip near a point. Whether or not a grip is considered depends on the Style of this wheel.
point (PointF)Location of point in wheel coordinates.
Grip closest to location or GH_ColourWheelGrip.NoGrip if no grip was near the point.

Read

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

RenderWheel

#
public void RenderWheel(Graphics graphics, double alpha, bool selected)
Render the wheel to a graphics surface.
graphics (Graphics)Graphics object to draw with.
alpha (double)Apha multiplyer for certain wheel elements. 0 = no draw, 1 = normal draw.
selected (bool)If true, the spectrum disk wil be drawn with a selected overlay.

SetDefault

#
public void SetDefault(GH_ColourWheelStyle style)
Set all values to a fixed default.
style (GH_ColourWheelStyle)

SetGrip

#
public bool SetGrip(GH_ColourWheelGrip grip, Point3d position)
Set a single grip to a new location.
grip (GH_ColourWheelGrip)Byval grip to set.
position (Point3d)New grip position.
True if the grips were changed.

Write

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