GH_ColourCube
ReferencesMaintains 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.
Parameters:
| box (Rectangle) | Rectangle containing entire colour cube. Should be square. |
| space (GH_ColourSpace) | |
| color (Point4d) |
Properties
BackFace
#Gets a graphics path describing the back face of the cube. Caller is responsible for disposing of this path instance.
BottomFace
#Gets a graphics path describing the bottom face of the cube. Caller is responsible for disposing of this path instance.
LeftFace
#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
#Gets a graphics path describing the outline of the drop shadow. Caller is responsible for disposing of this path instance.
Silhouette
#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.
ColorAtRail
#Get the color at a position along the depth rail.
Parameters:
| pt (PointF) | Point along rail (will be projected into rail limits) |
Returns: Point4d structure representing the colour in the current space.
ColorAtSlice
#Get the color at a position on the slice.
Parameters:
| pt (PointF) | Point on slice (will be projected into slice limits) |
Returns: Point4d structure representing the colour in the current space.
RenderAll
#Call all render methods in the correct order.
Parameters:
| G (Graphics) | Graphics object to draw with. |
RenderBackEdges
#Render the edges of the back face creases.
Parameters:
| G (Graphics) | Graphics object to draw with |
RenderBackFaces
#Render the fills of the backfaces.
Parameters:
| G (Graphics) | Graphics object to draw with |
RenderDropShadow
#Render the drop shadow of the cube.
Parameters:
| G (Graphics) | Graphics object to draw with |
RenderEdgeShadows
#Render the edge shadows of the cube due to GI.
Parameters:
| G (Graphics) | Graphics object to draw with |
RenderForeEdges
#Render the edges of the fore face creases.
Parameters:
| G (Graphics) | Graphics object to draw with |
RenderPivot
#Render the colour pivot on the current slice.
Parameters:
| G (Graphics) | Graphics object to draw with. |
RenderSilhouetteEdges
#Render the edges of the cube silhouettes.
Parameters:
| G (Graphics) | Graphics object to draw with |
RenderSlice
#Render the square slice with colour gradients.
Parameters:
| G (Graphics) | Graphics object to draw with. |
RenderSliceDropShadow
#Render the drop shadow onto the slice.
Parameters:
| G (Graphics) | Graphics object to draw with. |