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
)

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

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

LuminanceMax

#
public double LuminanceMax { get; set; }

LuminanceMin

#
public double LuminanceMin { get; set; }

LuminanceRail

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

SaturationMax

#
public double SaturationMax { get; set; }

SaturationMin

#
public double SaturationMin { get; set; }

SaturationRail

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

Style

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

Wheel

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

Methods

BeginGripDrag

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

BeginGripDrag

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

ContinueGripDrag

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

ContinueGripDrag

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

CreatePalette

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

EndGripDrag

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

GetGrip

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

GripAtPoint

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

GripAtPoint

#
Find the grip near a point. Whether or not a grip is considered depends on the Style of this wheel.
public GH_ColourWheelGrip GripAtPoint(
PointF
point
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(
reader
)
Read

RenderWheel

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

SetDefault

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

SetGrip

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

Write

#
public bool Write(
writer
)
Write