Ensemble Graphics Toolkit: Animation Part 2

Introduction

In this training topic, you will learn how to construct an AnimationSequence class and introduce AnimationDelay class to create an animation sequence.

Steps:

  • AnimationSequence Class

Prerequisites

You have prepared the Host PC with all the development software tools and Ensemble Graphics Toolkit source code as explained in:

You have installed and prepared the Eclipse IDE for C/C++ Developers as explained in:

You have performed the exercises on the topic:


AnimationSequence Class

In this section, you will modify the timer.cpp source code that you entered in the training topic Ensemble Graphics Toolkit: Animation Part 1 to construct an animation sequence.

In this training topic, you will use EgtProject and its settings you entered in the training topic: Ensemble Graphics Toolkit: Animation Part 1.

1

Modify the event.cpp source code by adding the following lines of code:

2

Save your program by selecting File > Save. You may also save with the command CTRL+S.

3

To build the project, hover over EgtProject, right-click, and select Build Project from the menu. Or you can click on the Build icon.

The Console window (bottom pane) will display the build progress.

4

Click on the Run button.

5

Observe the WVGA Display on the target:

The timer.cpp executable is running remotely on the target.

Observe the label “Ensemble Graphics Toolkit” at the top of the WVGA Display move (animate) along the animation sequence entered in the source code above.

animation_2.png

AnimationSequence class

From ~/egt/docs/html/annotated.html, click on the AnimationSequence class. All the functions, attributes, and constructors associated with the class are documented here.

The AnimationSequence class allows users to add and manage a series of animation objects and run them as a single animation. It also allows users to add one sequence into another to create complex animations.

AnimationDelay class

From ~/egt/docs/html/annotated.html, click on the AnimationDelay class. All the functions, attributes, and constructors associated with the class are documented here.

The AnimationDelay class allows user to insert simple delays into an animation sequence.

6

To stop the program, press the Stop button (upper left hand, just below the menu bar).

Before you start another session, be sure to Stop the current session.


Summary

In this training topic, you learned how to construct an AnimationSequence class and use AnimationDelay class to create an animation sequence.


What’s Next?

There’s plenty more to learn. Here are some additional Ensemble Graphics Toolkit training resources to help you gain more knowledge and skills:

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.