473,385 Members | 1,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 9721

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: rzed | last post by:
I'm using PIL to generate some images which may be rotated at the user's option. When they are rotated, the original image is cropped in the new image (which is fine), and the corners are black...
4
by: Shalley | last post by:
Hello, there, I have no idea how to draw an ellipse with an rotated angle. For example, the ellipse's center is (20.0, 50.0), two conjugate diameter pairs end-point are (35.0, 35.0), (25.0,...
1
by: Cc | last post by:
how do I draw string upside down?
3
by: faustino Dina | last post by:
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 ...
10
by: mrajanikrishna | last post by:
Hello friends, I have developed an application using ASP.NET and SQL Server. Ours is a garment factory. I need to design another module in my application. I want to generate images on fly...
0
by: Khadim | last post by:
Hi, I am facing a problem in my application. I have an image on which there are many numbers present. I can find the pixel position of the center of those numbers. Now I have the names of those...
2
by: Smokey Grindel | last post by:
I want to draw a string that is at a 90 degree angle instead of left to right it would be rotated 90 degrees... how would you go about doing this? thanks!
5
by: austincollins | last post by:
I have been searching for hours to find a solution to display text rotated at 90 degrees in firefox, and could not find one. css3 and IE has the css command "writing-mode: tb-rl;" but this does not...
7
by: halo combat22 | last post by:
I need help on a project i was assigned. I need a way to recognize these numbers. Any help is appreciated.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.