class::draw::AnimationAttr

class draw::AnimationAttr
  : public api::DrawInfoObject

Members

AnimationAttr()
sg_area_t area() const
void assign(

const AnimationAttr & attr
)

sg_animation_t & attr()
sg_animation_t * data()
drawing_size_t drawing_motion_total() const
u16 frame_delay() const
sg_size_t motion_total() const
u8 path() const
void set_drawing_motion_total(

drawing_size_t v
)

void set_frame_delay(

u16 value
)

void set_motion_total(

sg_size_t v
)

void set_path(

u8 v
)

void set_step_total(

u8 v
)

void set_type(

u8 v
)

sg_point_t start() const
u16 step_total() const
u8 type() const
enum @2
enum @3

Details

AnimationAttr()

Constructs a new animation attribute object.


sg_area_t area() const

Accesses the animation’s dimension (width and height from top-left corner).


void assign(

const AnimationAttr & attr
)


sg_animation_t & attr()

Returns a reference to the attibutes.


sg_animation_t * data()

drawing_size_t drawing_motion_total() const

Accesses the motion total in a drawing scale.


u16 frame_delay() const

Accesses the frame delay of the animation.


sg_size_t motion_total() const

Accesses the total motion (in pixels).


u8 path() const

Accesses the path (e.g. Animation::SQUARED).


void set_drawing_motion_total(

drawing_size_t v
)

Sets the total amount of motion as a ratio to the drawing scale.


void set_frame_delay(

u16 value
)

Sets the frame delay (in ms) of the animation.

Parameters

  • value The number of milliseconds to wait between frames.

The animation will at least wait the amount of time required to refresh the display. This delay will only have an effect if it is longer than the time required to update the display.


void set_motion_total(

sg_size_t v
)

Sets the total amount of motion (in pixels) of the animation.


void set_path(

u8 v
)

Sets the path (e.g. Animation::SQUARED).


void set_step_total(

u8 v
)

Sets the total number of steps in the animation.


void set_type(

u8 v
)

Sets the animation type (e.g. Animation::PUSH_DOWN).


sg_point_t start() const

Accesses the animation start point (top-left corner).


u16 step_total() const

Accesses the animation step total.


u8 type() const

Accesses the type (e.g. Animation::PUSH_DOWN).


enum @2
  • PUSH_LEFT Push Left
  • PUSH_RIGHT Push Right
  • PUSH_UP Push Up
  • PUSH_DOWN Push Down
  • SLIDE_LEFT Slide Left
  • UNDO_SLIDE_LEFT
  • SLIDE_UP Slide Up
  • UNDO_SLIDE_UP Undo Slide up
  • SLIDE_RIGHT Slide Right
  • UNDO_SLIDE_RIGHT
  • SLIDE_DOWN Slide Down
  • UNDO_SLIDE_DOWN Undo Slide Down
  • NONE No Animation
  • BOUNCE_UP Bounce off the top when scrolling up
  • BOUNCE_DOWN Bounce off the bottom when scrolling down
  • BOUNCE_LEFT Bounce off the left side
  • BOUNCE_RIGHT Bounce off the right side

enum @3
  • LINEAR Linear Animation
  • SQUARED Accelerating animation
  • SQUARED_UNDO De-accelerating animation

X

Thanks for Coming!

Subscribe to news and updates