Class: $.ColorWheel
- Inherits:
-
WatchUi.Drawable
-
WatchUi.Drawable
-
Overview
Draws a color wheel for the color picker
Constant Summary
Constant Variables
| Type | Name | Value | Since | Description |
|---|---|---|---|---|
| Type | NUM_POINTS | 30 |
Instance Member Summary collapse
Instance Method Summary collapse
-
draw(dc as Graphics.Dc) as Void
Draw an object to device context.
-
drawArc(dc as Graphics.Dc, centerX as Lang.Number, centerY as Lang.Number, startAngle as Lang.Float, endAngle as Lang.Float, fill as Lang.Boolean) as Void
Draw an arc that is a section of the color wheel.
-
getColor(index as Lang.Number) as Graphics.ColorType
Get the color of the item at the given index.
-
getColorIndex(color as Graphics.ColorType) as Lang.Number
Get the index of a color.
-
getNumberOfColors() as Lang.Number
Get the number of colors in the wheel.
-
initialize(colors as Lang.Array<Graphics.ColorType>)
Constructor.
-
setColor(index as Lang.Number) as Void
Set the current color index.
Instance Attribute Details
var _colors as Lang.Array<Graphics.ColorType>
var _index as Lang.Number
Instance Method Details
draw(dc as Graphics.Dc) as Void
Draw an object to device context
drawArc(dc as Graphics.Dc, centerX as Lang.Number, centerY as Lang.Number, startAngle as Lang.Float, endAngle as Lang.Float, fill as Lang.Boolean) as Void
Draw an arc that is a section of the color wheel
getColor(index as Lang.Number) as Graphics.ColorType
Get the color of the item at the given index
getColorIndex(color as Graphics.ColorType) as Lang.Number
Get the index of a color
getNumberOfColors() as Lang.Number
Get the number of colors in the wheel
initialize(colors as Lang.Array<Graphics.ColorType>)
Constructor
setColor(index as Lang.Number) as Void
Set the current color index