Class: Toybox.WatchUi.AnimationLayer

Overview

The class that represents an Animation layer

Since:

API Level 3.1.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

getDc() as Graphics.Dc or Null

getDc will always return null, as the dc buffer of animations can not be updated by user.

Since:

API Level 3.1.0

getResource() as WatchUi.AnimationResource

Get the animation resource

Returns:

Since:

API Level 3.1.0

initialize(rez as Lang.Symbol or WatchUi.AnimationResource, options as { :locX as Lang.Numeric, :locY as Lang.Numeric, :identifier as Lang.Object, :visibility as Lang.Boolean } or Null)

Constructor

Parameters:

  • rez(Lang.Number, WatchUi.AnimationResource)

    either an animation resource id or a WatchUi.AnimationResource

  • options(Lang.Dictionary)

    A Dictionary of options, can be null

    • :locX(Lang.Number)

      The initial absolute, on-screen x-coordinate for the Animation object (optional defaults to 0)

    • :locY(Lang.Number)

      The initial absolute, on-screen y-coordinate for the Animation object (optional defaults to 0)

    • :identifier(Lang.Object)

      unique object for identification (optional)

    • :visibility(Lang.Boolean)

      true if the layer is visible, otherwise false (optional, default to +true+)

Since:

API Level 3.1.0

Throws:

play(options as { :delegate as WatchUi.AnimationDelegate }) as Lang.Boolean

Play animation, animation must be added to and not abandoned by the view before it can be played.

This will stop the existing playback first.

Parameters:

Returns:

  • Lang.Boolean

    true if playback started, otherwise false

Since:

API Level 3.1.0

stop() as Void

Stop a playing animation.

  The last frame of the animation will be persisted in the frame buffer.

Since:

API Level 3.1.0


Generated Jan 5, 2024 1:53:16 PM