Rotating with a display list

Started by
1 comment, last by cozman 20 years ago
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.)
Advertisement
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]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
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.

This topic is closed to new replies.

Advertisement