IColourSpace

References
public interface IColourSpace
Base interface for all colour models.

Properties

Colour

#
Gets the colour currently selected in this model.
Colour Colour { get; }

Filter

#
Gets or sets the source for allowed colours. When not null, this property will limit displayed colours to the defined set of colours in the filter. Assigning a new filter will automatically wipe the display caches. Note that not all models necessarily constrain themselves to a filter, this property is a hint as much as anything.
NamedPalette Filter { get; set; }

Format

#
Format the current model state.
string Format { get; }

Icon

#
Gets the icon associated with this model.
IIcon Icon { get; }

Nomen

#
Gets the description of this model.
Nomen Nomen { get; }

Methods

Draw

#
Draw this colour model into a graphics context.
void Draw(
context,
Context to draw with.
RectangleF
bounds,
Target bounds for model.
visuals
Visual properties.
)

GetChannels

#
Gets the channel values of the current space. The current design of this api does not allow for a varying number of channels. This is potentially a big problem, potentially not. At present the only colour model which requires more than three channels is CMYK.
void GetChannels(
channel1,
Properties of first channel.
channel2,
Properties of second channel.
channel3
Properties of third channel.
)

RespondToMouseDown

#
Respond to a mouse down event on this model.
object RespondToMouseDown(
PointF
mouse,
Mouse coordinate.
MouseButtons
buttons
Mouse buttons.
)
Motion record specific to this model.

RespondToMouseMove

#
Respond to a mouse move event. These are only relayed when at least one mouse button is down.
void RespondToMouseMove(
motionData,
Mouse move begin record.
PointF
mouse,
New mouse location.
MouseButtons
buttons,
Mouse buttons involved.
Keys
keys
Modifier keys involved.
)

RespondToMouseUp

#
Respond to a mouse up event.
void RespondToMouseUp(
motionData,
PointF
mouse,
MouseButtons
buttons,
Keys
keys
)

SetChannels

#
Update the colour from channels.
void SetChannels(
channel1,
First channel.
channel2,
Second channel.
channel3
Third channel.
)

SetColour

#
Change this colour model to reflect a given colour. There is no guarantee that the model colour will be exactly equal to the given colour, there may be both rounding errors as well as gamut constraints.
void SetColour(
colour
Colour to match.
)