Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing Text At An Angle

Tags:

delphi

vcl

I am writing a VCL/Delphi Application, and I need to draw text onto a Canvas object. I am having troubles though because I need the text to be at a variable size and angle. Is there any easy way of doing this? The TextOut method only takes arguments for the Starting Coordinates, so I dont know how i can get it to draw rotated text.
Thanks!

like image 966
Ben313 Avatar asked Jul 28 '10 16:07

Ben313


1 Answers

If you're drawing on a canvas, take a look at Canvas.Font.Orientation. It takes an angle as an integer in tenths of a degree. (ie. You pass 900 for a 90 degree angle.)

like image 191
Mason Wheeler Avatar answered Oct 13 '22 15:10

Mason Wheeler