Class: Toybox::WatchUi::AnimationLayer

Inherits:
Layer show all

Overview

The class that represents an Animation layer

Since:

  • 3.1.0

Instance Method Summary collapse

Methods inherited from Layer

getId, getX, getY, isVisible, setLocation, setVisible, setX, setY

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initialize(rez, options) ⇒ Toybox::WatchUi::Animation

either an animation resource id or a WatchUi.AnimationResource

Parameters:

Options Hash (options):

  • :locX (Toybox::Lang::Number)

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

  • :locY (Toybox::Lang::Number)

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

  • :identifier, (Toybox::Lang::Number)

    unique number or string for identification (optional)

Raises:

Since:

  • 3.1.0


16285
16286
# File 'Monkeybrains.rb', line 16285

def initialize(rez, options)
end

Instance Method Details

getDcObject

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

Since:

  • 3.1.0


16290
16291
# File 'Monkeybrains.rb', line 16290

def getDc()
end

getResourceToybox::WatchUi::AnimationResource

Get the animation resource


16296
16297
# File 'Monkeybrains.rb', line 16296

def getResource()
end

play(options) ⇒ Toybox::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:

Options Hash (options):

Returns:

Since:

  • 3.1.0


16309
16310
# File 'Monkeybrains.rb', line 16309

def play(options)
end

stopObject

Stop a playing animation.

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

Since:

  • 3.1.0


16315
16316
# File 'Monkeybrains.rb', line 16315

def stop()
end