Class: Toybox.WatchUi.Layer
- Inherits:
-
Toybox.Lang.Object
Overview
A representation of View Layer that will be drawn (bitblit) by system onto the screen during screen update, which include regular View update (onUpdate/onPartialUpdate) as well as animation playback if supported.
Direct Known Subclasses
Typedef Summary collapse
- Options as { :locX as Lang.Numeric, :locY as Lang.Numeric, :width as Lang.Number, :height as Lang.Number, :colorDepth as Lang.Number, :visibility as Lang.Boolean, :identifier as Lang.Object }
Instance Method Summary collapse
-
getDc() as Graphics.Dc or Null
Get the Graphics.Dc to draw on.
-
getId() as Lang.Object or Null
Layer identifier, can be
null
. -
getX() as Lang.Numeric
Get X-axis absolute draw offset relative to the screen origin.
-
getY() as Lang.Numeric
Get Y-axis absolute draw offset relative to the screen origin.
-
initialize(options as Layer.Options or Null)
Constructor.
- isVisible() as Lang.Boolean
-
setLocation(x as Lang.Numeric, y as Lang.Numeric) as Void
Set draw offset relative to the screen origin.
-
setVisible(visible as Lang.Boolean) as Void
Set visibility of the layer, if the layer hasn't been added to a view, or the view isn't on top of view stack, the value will be saved.
-
setX(x as Lang.Numeric) as Void
Set X-axis absolute draw offset relative to the screen origin.
-
setY(y as Lang.Numeric) as Void
Set Y-axis absolute draw offset relative to the screen origin.
Instance Method Details
getDc() as Graphics.Dc or Null
Get the Graphics.Dc to draw on.
getId() as Lang.Object or Null
Layer identifier, can be null
getX() as Lang.Numeric
Get X-axis absolute draw offset relative to the screen origin
getY() as Lang.Numeric
Get Y-axis absolute draw offset relative to the screen origin
initialize(options as Layer.Options or Null)
Constructor
isVisible() as Lang.Boolean
setLocation(x as Lang.Numeric, y as Lang.Numeric) as Void
Set draw offset relative to the screen origin
setVisible(visible as Lang.Boolean) as Void
Set visibility of the layer, if the layer hasn't been added to a view, or the view isn't on top of view stack, the value will be saved.
setX(x as Lang.Numeric) as Void
Set X-axis absolute draw offset relative to the screen origin
setY(y as Lang.Numeric) as Void
Set Y-axis absolute draw offset relative to the screen origin