AbstractColourBall
ReferencesRepresents 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.
Parameters:
| nomen (Nomen) | Description of ball. |
| point (Point4d) | Sphere coordinate. |
| colour (Colour) | Colour associated with coordinate. |
| rotation (SphereRotation = null) | Optional rotation. |
Properties
Coordinate
#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.
Pivot
#public PointF Pivot { get; }
Gets the centre point of the pivot. This field will be unset before the first paint.
Methods
AssignSphereState
#Most-derived type constructor invoke.
Parameters:
| point (Point4d) | New point. |
| colour (Colour) | New colour. |
| rotation (SphereRotation) | Rotation. |
Returns: Must return new instance of the derived type.
Draw
#Render this sphere into a graphics context.
Parameters:
| context (Context) | Graphics context. |
| bounds (RectangleF) | Sphere bounds. |
| visuals (ColourModelVisuals) | Sphere drawing properties. |
Implements: Draw
GetChannels
#Gets the channel values of the current space.
Parameters:
| channel1 (out UiNumber) | Properties of first channel. |
| channel2 (out UiNumber) | Properties of second channel. |
| channel3 (out UiNumber) | Properties of third channel. |
Implements: GetChannels
Parameters:
| mouse (PointF) | |
| buttons (MouseButtons) |
Implements: RespondToMouseDown
void IColourSpace.RespondToMouseMove(object mouseRecord, PointF mouse, MouseButtons buttons, Keys keys)
Parameters:
| mouseRecord (object) | |
| mouse (PointF) | |
| buttons (MouseButtons) | |
| keys (Keys) |
Implements: RespondToMouseMove
void IColourSpace.RespondToMouseUp(object motionData, PointF mouse, MouseButtons buttons, Keys keys)
Parameters:
| motionData (object) | |
| mouse (PointF) | |
| buttons (MouseButtons) | |
| keys (Keys) |
Implements: RespondToMouseUp
SetChannels
#Sets the three channel values.
Parameters:
| channel1 (UiNumber) | First channel. |
| channel2 (UiNumber) | Second channel. |
| channel3 (UiNumber) | Third channel. |
Returns: True if new channels were successfully applied, false if some rounding/clipping was required.
Implements: SetChannels