How to draw rotated text?

  • Thread starter Thread starter faustino Dina
  • Start date Start date
F

faustino Dina

Hi,

I was looking on the SDK but I can't find how to draw text in angles
different from 0 and 90. Is it possible? If not, does exist some 3rd party
library allowing this? Any hint is welcomed

Thanks in advance
Faustino
 
Try using Graphics.DrawPath() or FillPath() methods. Look at help for
GraphicsPath.AddString() that might help you out..
 
Hi,

To rotate text at a location, follow these steps

1 - Do a translate transformation to the location of your text
2 - Do a rotate transform through the required angle
3 - Write the text as normal using drawstring

The following code should help you, it assumes that there are no prior
transformations

objGraphics.TranslateTransform(X, Y)
objGraphics.RotateTransform(.Rotation)
objGraphics.DrawString(Text, Font, objBrush, 0, 0, .StringFormat)

James
 
Back
Top