AnimatedSprite

Plays a single sprite animation stored as a series of frames. More...

Import Statement: import Felgo 3.0
Inherits:

Item

Properties

Methods

Detailed Description

AnimatedSprite provides rendering and control over animations which are provided as multiple frames in the same image file. You can play it at a fixed speed, at the frame rate of your display, or manually advance and control the progress.

For full Qt 5 documentation see AnimatedSprite and the Sprite Animations overview. Note that the AnimatedSprite type does not use Sprite types to define multiple animations, but instead encapsulates a single animation itself.

Note: For sprites with improved performance use TexturePackerAnimatedSprite instead.

Felgo Additions to AnimatedSprite

AnimatedSprite enhances the Qt 5 component AnimatedSprite with Content Scaling and Dynamic Image Switching Support & Density Independence.

Specifically, it allows you to:

See the Felgo Script for Multi-Resolution Asset Generation how to create sprite sheets from single sprite frames and scale them down automatically.

Property Documentation

currentFrame : alias

See AnimatedSprite::currentFrame.


frameCount : alias

See AnimatedSprite::frameCount.


frameDuration : alias

See AnimatedSprite::frameDuration.


frameHeight : int

See AnimatedSprite::frameHeight.


frameRate : alias

See AnimatedSprite::frameRate.


frameSync : alias

See AnimatedSprite::frameSync.


frameWidth : int

See AnimatedSprite::frameWidth.


frameX : int

See AnimatedSprite::frameX.


frameY : int

See AnimatedSprite::frameY.


interpolate : alias

See AnimatedSprite::interpolate.


loops : alias

See AnimatedSprite::loops.


mirrorX : bool

This property holds whether the image should be horizontally mirrored.

Note: Mirroring on the horizontal axis is internally achieved by setting the Item::transform property. Thus if you set the transform property explicitly, you need to apply the y-scaling manually.

The default value is false.


mirrorY : bool

This property holds whether the image should be vertically mirrored.

Note: Mirroring on the verical axis is internally achieved by setting the Item::transform property. Thus if you set the transform property explicitly, you need to apply the y-scaling manually.

The default value is false.


paused : alias

See AnimatedSprite::paused.


reverse : alias

See AnimatedSprite::reverse.


running : alias

See AnimatedSprite::running.


source : alias

See AnimatedSprite::source.


startFrameColumn : int

An alternative to defining frameX, the left position of the first frame in the Sprite animation. If set, the frameX property is automatically calculated based on the column number by multiplying it with the frameWidth.

Note: The first colum (so the left-most frame) starts with column 1, not 0. The default value is 1.


startFrameRow : int

An alternative to defining frameY, the top position of the first frame in the Sprite animation. If set, the frameY property is automatically calculated based on the row number by multiplying it with the frameHeight.

Note: The first row (so the top-most frame) starts with row 1, not 0. The default value is 1.


Method Documentation

advance()

See AnimatedSprite::advance().


pause()

See AnimatedSprite::pause().


restart()

See AnimatedSprite::restart().


resume()

See AnimatedSprite::resume().


Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support