GH_ColourCube

References
public class GH_ColourCube
Maintains a collection of graphical shapes and coordinates that specify important features of the Colour Space Cube graphics.

Constructors

GH_ColourCube

#
public GH_ColourCube(Rectangle box, GH_ColourSpace space, Point4d color)
Create a new instance of this class.
box (Rectangle)Rectangle containing entire colour cube. Should be square.
space (GH_ColourSpace)
color (Point4d)

Properties

BackFace

#
public GraphicsPath BackFace { get; }
Gets a graphics path describing the back face of the cube. Caller is responsible for disposing of this path instance.

BottomFace

#
public GraphicsPath BottomFace { get; }
Gets a graphics path describing the bottom face of the cube. Caller is responsible for disposing of this path instance.

C0

#
public Point C0 { get; }
Gets the first point in the corner point list.

C1

#
public Point C1 { get; }
Gets the second point in the corner point list.

C2

#
public Point C2 { get; }
Gets the third point in the corner point list.

C3

#
public Point C3 { get; }
Gets the fourth point in the corner point list.

C4

#
public Point C4 { get; }
Gets the fifth point in the corner point list.

C5

#
public Point C5 { get; }
Gets the sixth point in the corner point list.

C6

#
public Point C6 { get; }
Gets the seventh point in the corner point list.

C7

#
public Point C7 { get; }
Gets the eighth point in the corner point list.

Grip

#
public Rectangle Grip { get; }
Gets the rectangle that describes the slice grip.

LeftFace

#
public GraphicsPath LeftFace { get; }
Gets a graphics path describing the left face of the cube. Caller is responsible for disposing of this path instance.

Pivot

#
public Point Pivot { get; }
Gets the point that describes the center of the pivot on the slice.

S0

#
public Point S0 { get; }
Gets the first point in the shadow point list. This point is coincident with C0.

S1

#
public Point S1 { get; }
Gets the second point in the shadow point list. This is the corner of the drop-shadow on the bottom face.

S2

#
public Point S2 { get; }
Gets the third point in the shadow point list. This point is the kink of the drop-shadow on the edge connecting C2 and C3.

S3

#
public Point S3 { get; }
Gets the fourth point in the shadow point list. This point is coincident with C7.

S4

#
public Point S4 { get; }
Gets the fifth point in the shadow point list. This point is coincident with C4.

Shadow

#
public GraphicsPath Shadow { get; }
Gets a graphics path describing the outline of the drop shadow. Caller is responsible for disposing of this path instance.

Silhouette

#
public GraphicsPath Silhouette { get; }
Gets a graphics path describing the silhouette of the cube. Caller is responsible for disposing of this path instance.

Slice

#
public Rectangle Slice { get; }
Gets the rectangle that describes the cutting slide through the current colour space.

Methods

Average

#
public Color Average(Color A, Color B, Color C, Color D)
Compute the average of four colours.
A (Color)First colour for average.
B (Color)Second colour for average.
C (Color)Third colour for average.
D (Color)Fourth colour for average.
The average of A, B, C and D.

Average

#
public Color Average(Color A, Color B)
Compute the average of two colours.
A (Color)First colour for average.
B (Color)Second colour for average.
The average of A and B.

Blend

#
public Color Blend(Color A, Color B, double t)
Inteprolate between two colours.
A (Color)First colour.
B (Color)Second colour.
t (double)Interpolation parameter.
Interpolated colour.

ColorAtRail

#
public Point4d ColorAtRail(PointF pt)
Get the color at a position along the depth rail.
pt (PointF)Point along rail (will be projected into rail limits)
Point4d structure representing the colour in the current space.

ColorAtSlice

#
public Point4d ColorAtSlice(PointF pt)
Get the color at a position on the slice.
pt (PointF)Point on slice (will be projected into slice limits)
Point4d structure representing the colour in the current space.

RenderAll

#
public void RenderAll(Graphics G)
Call all render methods in the correct order.
G (Graphics)Graphics object to draw with.

RenderBackEdges

#
public void RenderBackEdges(Graphics G)
Render the edges of the back face creases.
G (Graphics)Graphics object to draw with

RenderBackFaces

#
public void RenderBackFaces(Graphics G)
Render the fills of the backfaces.
G (Graphics)Graphics object to draw with

RenderDropShadow

#
public void RenderDropShadow(Graphics G)
Render the drop shadow of the cube.
G (Graphics)Graphics object to draw with

RenderEdgeShadows

#
public void RenderEdgeShadows(Graphics G)
Render the edge shadows of the cube due to GI.
G (Graphics)Graphics object to draw with

RenderForeEdges

#
public void RenderForeEdges(Graphics G)
Render the edges of the fore face creases.
G (Graphics)Graphics object to draw with

RenderGrip

#
public void RenderGrip(Graphics G)
Render the slice grip.
G (Graphics)Graphics object to draw with.

RenderPivot

#
public void RenderPivot(Graphics G)
Render the colour pivot on the current slice.
G (Graphics)Graphics object to draw with.

RenderSilhouetteEdges

#
public void RenderSilhouetteEdges(Graphics G)
Render the edges of the cube silhouettes.
G (Graphics)Graphics object to draw with

RenderSlice

#
public void RenderSlice(Graphics G)
Render the square slice with colour gradients.
G (Graphics)Graphics object to draw with.

RenderSliceDropShadow

#
public void RenderSliceDropShadow(Graphics G)
Render the drop shadow onto the slice.
G (Graphics)Graphics object to draw with.

RenderSliceEdgeShadows

#
public void RenderSliceEdgeShadows(Graphics G)
Render the edge shadows of the slice due to GI.
G (Graphics)Graphics object to draw with.

RenderSliceSilhouetteEdges

#
public void RenderSliceSilhouetteEdges(Graphics G)
Render the silhouette edges of the slice.
G (Graphics)Graphics object to draw with.