Struct AnimationHelper

Helper to handle animation progress

Properties

Name Type Description
elapsed [get] long returns time elapsed since start
finished [get] bool Returns true if animation is finished
interval [get] long get current time interval
interval [set] long override current time interval, retaining the same progress %
progress [get] int Returns animation progress in interval 0..maxProgress while timeElapsed is between 0 and maxInterval; when interval exceeded, progress is maxProgress

Methods

Name Description
animate Adds elapsed time; returns animation progress in interval 0..maxProgress while timeElapsed is between 0 and maxInterval; when interval exceeded, progress is maxProgress
getProgress Returns animation progress in interval 0..maxProgress while timeElapsed is between 0 and maxInterval; when interval exceeded, progress is maxProgress
restart restart with same max interval and progress
start start new animation interval

Authors

Vadim Lopatin, coolreader.org@gmail.com

Copyright

Vadim Lopatin, 2014

License

Boost License 1.0