469,890 Members | 2,154 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

How to draw rotated text?

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
Jul 21 '05 #1
3 9575

Try using Graphics.DrawPath() or FillPath() methods. Look at help for
GraphicsPath.AddString() that might help you out..

--
Girish Bharadwaj
"faustino Dina" <fd***@matusa.com.mx> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #2
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
--
Create interactive flowcharts, diagrams and UML models with ERM3 at
http://www.crainiate.net

"faustino Dina" <fd***@matusa.com.mx> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #3
The GDI+ FAQ has the answer.

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Blog http://bobpowelldotnet.blogspot.com

"faustino Dina" <fd***@matusa.com.mx> wrote in message
news:#6**************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Cc | last post: by
3 posts views Thread by faustino Dina | last post: by
10 posts views Thread by mrajanikrishna | last post: by
reply views Thread by Khadim | last post: by
2 posts views Thread by Smokey Grindel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.