YxyDiagramGeometry
All the vector geometry part of a chromaticity diagram cached for a specific frame. Try re-using instances of this class if possible to avoid unnecessary overhead.
Constructors
Properties
Grid
#Gets the grid rectangle. It takes up 80% of the frame width and 90% of the frame height.
public RectangleF Grid { get; }
YxyUnit
#Gets the texture rectangle unit target rectangle. It exceeds the frame, but is used only to position Yxy vectorial unitised geometry within the grid.
public RectangleF YxyUnit { get; }
Methods
DrawDiagramFill
#Draw the Yxy diagram texture.
public void DrawDiagramFill()
context,
Graphics context.
Bitmap
texture
Yxy texture. You should generate this using a YxyDiagramCache instance.
DrawGamutBoundary
#Draw the sRGB gamut boundary.
public void DrawGamutBoundary()
context,
Graphics context.
Pen
edge,
Pen to use for gamut boundary.
Color
labelColour,
Colour of gamut label.
Font
font
Font of gamut label.
DrawGamutExcession
#Draw the region outside the sRGB gamut.
DrawGrid
#Draw the Yxy grid lines.
public void DrawGrid()
context,
Context to draw with.
Pen
border,
Pen for grid border.
Pen
majorLine,
Pen for 0.1 grid lines.
Pen
minorLine
Pen for 0.05 grid lines.
DrawGridLabels
#Draw the grid labels. Note that the labels exceed the Frame rectangle and are typically not included.
public void DrawGridLabels()
DrawPlanckianLocus
#Draw the Planckian locus.
DrawPurpleShadow
#Draw a drop shadow along the line of purples.
DrawSpectralLocus
#Draw the spectral locus and the line of purples.
LimitChromaticityToGrid
#Limit a chromaticity coordinate to the interior of the grid, thus avoiding colours exceeding the chromaticity diagram.
Returns: True if coordinate had to be projected.
LimitChromaticityToSpectrum
#Limit a chromaticity coordinate to the interior of the spectrum, thus avoiding a imaginary colours.
Returns: True if coordinate had to be projected.