PDA

View Full Version : Display text at slanting at 45degrees



guest
02-18-2003, 09:56 PM
anyone here knows how to display output text slanting at 45 degrees?
TIA

Mazy
02-18-2003, 11:30 PM
If you dont have any other translations and you use anything else that glDrawPixels to draw the text then a simple glRotate(45,0,0,1) will do the trick

nexusone
02-19-2003, 05:23 AM
Maybe someone else correct me, but glDrawPixels is a 2D operation which is not effected by matrix operations like scale, rotate, translate or at least not as expected.

So the use of glRotate would not change the angle of the bitmap text.

If you wanted rotated text, look into textured fonts.


Originally posted by Mazy:
If you dont have any other translations and you use anything else that glDrawPixels to draw the text then a simple glRotate(45,0,0,1) will do the trick



[This message has been edited by nexusone (edited 02-19-2003).]

Deiussum
02-19-2003, 06:17 AM
The raster position is affected by the ModelView matrix, but in using glDrawPixels, the raster position is just used as the location to start the drawing. The rest of the pixels drawn won't be affected at all by the matrix, therefore you wouldn't get the text rotated if using glRotate with glDrawPixels.