AbstractColourBall

References
public abstract class AbstractColourBall : IColourSpace
Represents an immutable, generic colour sphere with a normalised 4d coordinate. X equals longitude and ranges from zero to 360, Y equals latitude and ranges from -90 to +90, Z is a normalised perpendicular dimension used only by the texture cache, and W is always assumed to represent transparency.

Constructors

AbstractColourBall

#
protected AbstractColourBall(Nomen nomen, Point4d point, Colour colour, SphereRotation rotation = null)
Create a new sphere.
nomen (Nomen)Description of ball.
point (Point4d)Sphere coordinate.
colour (Colour)Colour associated with coordinate.
rotation (SphereRotation = null)Optional rotation.

Properties

Colour

#
public Colour Colour { get; }
Gets the colour currently selected.
Colour

Coordinate

#
public Point4d Coordinate { get; }
Gets or sets the sphere pivot location. The coordinate is normalised along all dimensions, with x representing the longitude, y the latitude, z the perpendicular and w the opacity.

Disc

#
public CircleF Disc { get; }
Gets the boundary of the disc. This field will be unset before the first paint.

Filter

#
public abstract NamedPalette Filter { get; set; }
Filter

Format

#
public abstract string Format { get; }
Format the current model.
Format

Icon

#
public abstract IIcon Icon { get; }
Icon

Nomen

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

Pivot

#
public PointF Pivot { get; }
Gets the centre point of the pivot. This field will be unset before the first paint.

PivotVisible

#
public bool PivotVisible { get; }
Gets whether the pivot is on the visible part of the sphere.

Rotation

#
public SphereRotation Rotation { get; }
Gets the current rotation for this sphere.

Sphere

#
public Sphere Sphere { get; }
Gets the physical sphere.

Zoom

#
public float Zoom { get; }
Gets the zoom factor that was relevant during the most recent paint operation.

Methods

AssignSphereState

#
protected void AssignSphereState(Point4d point, Colour colour, SphereRotation rotation)
Most-derived type constructor invoke.
point (Point4d)New point.
colour (Colour)New colour.
rotation (SphereRotation)Rotation.
Must return new instance of the derived type.

Draw

#
public void Draw(Context context, RectangleF bounds, ColourModelVisuals visuals)
Render this sphere into a graphics context.
context (Context)Graphics context.
bounds (RectangleF)Sphere bounds.
visuals (ColourModelVisuals)Sphere drawing properties.
Draw

GetChannels

#
public abstract void GetChannels(out UiNumber channel1, out UiNumber channel2, out UiNumber channel3)
Gets the channel values of the current space.
channel1 (out UiNumber)Properties of first channel.
channel2 (out UiNumber)Properties of second channel.
channel3 (out UiNumber)Properties of third channel.
GetChannels

GetTexture

#
protected abstract IMultiResolutionTexture GetTexture()
Gets the texture for the current projection.
Explicit

IColourSpace.RespondToMouseDown

#
object IColourSpace.RespondToMouseDown(PointF mouse, MouseButtons buttons)
mouse (PointF)
buttons (MouseButtons)
RespondToMouseDown
Explicit

IColourSpace.RespondToMouseMove

#
void IColourSpace.RespondToMouseMove(object mouseRecord, PointF mouse, MouseButtons buttons, Keys keys)
mouseRecord (object)
mouse (PointF)
buttons (MouseButtons)
keys (Keys)
RespondToMouseMove
Explicit

IColourSpace.RespondToMouseUp

#
void IColourSpace.RespondToMouseUp(object motionData, PointF mouse, MouseButtons buttons, Keys keys)
motionData (object)
mouse (PointF)
buttons (MouseButtons)
keys (Keys)
RespondToMouseUp

SetChannels

#
public abstract void SetChannels(UiNumber channel1, UiNumber channel2, UiNumber channel3)
Sets the three channel values.
channel1 (UiNumber)First channel.
channel2 (UiNumber)Second channel.
channel3 (UiNumber)Third channel.
True if new channels were successfully applied, false if some rounding/clipping was required.
SetChannels

SetColour

#
public void SetColour(Colour colour)
Modify the point of this cube to match a certain colour.
colour (Colour)Colour to match.
Modified cube.
SetColour

ToColour

#
protected abstract Colour ToColour(Point4d point)
Convert from sphere coordinate to colour.
point (Point4d)

ToPoint

#
protected abstract Point4d ToPoint(Colour colour)
Convert from colour to sphere coordinate.
colour (Colour)