class::draw::Animation

class draw::Animation
  : public draw::AnimationAttr
  : public api::DrawWorkObject

Members

Animation()
Animation(

const AnimationAttr & attr
)

bool exec(

void(*)(void *, int, int) draw,
void * obj
)

void init(

Drawing * current,
Drawing * target,
const DrawingAttr & attr
)

void reinit()

Details

Animation()

Constructs a new animation object.


Animation(

const AnimationAttr & attr
)


bool exec(

void(*)(void *, int, int) draw,
void * obj
)

Executes the animation.

Parameters

  • draw A callback that is execute between each frame

  • obj The argument passed to the draw callback

The draw callback can be used to update the display. This will work best on areas of the screen that are not affected by the animation.


void init(

Drawing * current,
Drawing * target,
const DrawingAttr & attr
)

Initializes the animation.

Parameters

  • current The current drawing

  • target The target drawing

  • attr The drawing attributes

If current is non-null it will be drawn on the visible screen when init() is called.

If target is non-null, it will be drawn on the scratch bitmap. Most animations will transition from the currentDrawing to the target drawing.

The drawing attributes (attr) will be used to define the starting point and dimensions of the animation attributes.


void reinit()

X

Thanks for Coming!

Subscribe to news and updates