Results 1 to 2 of 2

Thread: Simple Animation

  1. #1
    Serf
    Join Date
    Jan 2008
    Posts
    4

    Unhappy Simple Animation

    This may be the dumbest question on the forum, but can anyone tell me how to animate a CL_Surface in a circle?

    I need to animate a disco light that rotates a little further with each frame but this simple task is holding me back.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Uh.. is this V0.8.X? If so:

    To rotate a CL_Surface, set the rotation angle right before drawing it. For instance, to rotate 1 degree each frame:

    Code:
    mySurf.set_angle(mySurf.get_angle()+1);
    If you need to get fancy, think about using a CL_Sprite instead of a CL_Surface. (internally, it's a CL_Surface with more features)
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. simple ClanLib example problem - segfault
    By phx_one in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 02-17-2008, 12:54 AM
  2. Simple app won't compile when linked with clanlib
    By mmiikkee12 in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-17-2007, 02:41 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •