Archived

This topic is now archived and is closed to further replies.

cozman

Rotating with a display list

Recommended Posts

cozman    583
I am currently using a bitmap font class which uses display lists to draw the individual letters. I was thinking of adding the ability to draw rotated text, so that the string is rotated about it''s own center. If I were writing "Hello World" I''d be rotating the text so that the space in the middle stayed still, and the rest of the text would be rotated at the specified angle. I am pretty sure that each letter would have to be rotated/translated individually, so I couldn''t use the display list. I probably won''t even bother doing this at the moment since it''s such a minor feature, but I figured if it was easier than it looked, like if there was some way I could do this to the entire list it was worth putting in. Does anyone have any ideas on how I can do this? (Or does anybody even know what I''m trying to say? I know I wasn''t able to explain it very well.)

Share this post


Link to post
Share on other sites
Fruny    1658
Compute the starting position based on the angle and centerpoint. Translate and rotate appropriately. Then call the list.

[edited by - Fruny on March 29, 2004 8:14:51 PM]

Share this post


Link to post
Share on other sites
cozman    583
Translating to the center point does not work since several images are being drawn. With a single image that would work, but when 20 individual letters are being drawn, and I translate to the centerpoint this method breaks down.

Share this post


Link to post
Share on other sites