Results 1 to 7 of 7

Thread: Rotating Font?

  1. #1

    Default Rotating Font?

    Hi all,

    i found out, howto rotate a Sprite via set_angle.

    But how to do that with a font?

    Cheers,
    Kingfinn

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Currently, the only way to do this, is to change the modelview matrix.

    That is how the multiwindow example does it.



    Code:
    	gc.push_modelview();
    	gc.mult_translate( (float) gc.get_width() / 2.0f, (float) gc.get_height() / 2.0f );
    	gc.mult_rotate( CL_Angle(angle, cl_radians), 0.0f, 0.0f, 1.0f, false );
    	font.draw_text(gc, xoffset, yoffset, example_text, CL_Colorf::white);
    	gc.pop_modelview();

  3. #3

    Default

    But, if I get it right, it changes the whole buffer, does it?

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Quote Originally Posted by kingfinn View Post
    But, if I get it right, it changes the whole buffer, does it?
    No, it doesn't change the whole buffer

    You can change the model view matrix as many times as you want.

  5. #5

    Default

    kay, I will try on that. Thanx a Lot!

    Btw are you the only active user in this Forum?

  6. #6
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Quote Originally Posted by kingfinn View Post
    kay, I will try on that. Thanx a Lot!

    Btw are you the only active user in this Forum?
    heh heh, no I'm just trying to catch up Seth, in the number of post's http://www.rtsoft.com/forums/memberl...rt=posts&pp=50

  7. #7

    Default

    Quote Originally Posted by rombust View Post
    heh heh, no I'm just trying to catch up Seth, in the number of post's http://www.rtsoft.com/forums/memberl...rt=posts&pp=50
    geek good luck!

Similar Threads

  1. How to use a custom TTF-Font?
    By Impz0r in forum Official ClanLib SDK Forums
    Replies: 8
    Last Post: 05-26-2010, 06:54 PM
  2. Rotating view and minimap
    By attle in forum Novashell Game Creation System
    Replies: 4
    Last Post: 12-22-2008, 02:26 AM
  3. Font Metrics
    By Judas in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 08-01-2008, 10:44 PM
  4. Font Problems
    By Vish in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 07-26-2008, 07:14 PM
  5. Rotating tiles/entities
    By sphair in forum Novashell Game Creation System
    Replies: 0
    Last Post: 03-12-2007, 09:33 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
  •