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

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

Properties

BackFace

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

BottomFace

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

C0

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

C1

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

C2

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

C3

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

C4

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

C5

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

C6

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

C7

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

Grip

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

LeftFace

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

Pivot

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

S0

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

S1

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

S2

#
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.
public Point S2 { get; }

S3

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

S4

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

Shadow

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

Silhouette

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

Slice

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

Methods

Average

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

Average

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

Blend

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

ColorAtRail

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

ColorAtSlice

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

RenderAll

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

RenderBackEdges

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

RenderBackFaces

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

RenderDropShadow

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

RenderEdgeShadows

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

RenderForeEdges

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

RenderGrip

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

RenderPivot

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

RenderSilhouetteEdges

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

RenderSlice

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

RenderSliceDropShadow

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

RenderSliceEdgeShadows

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

RenderSliceSilhouetteEdges

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