Re: Drawing vertical string
- From: "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@xxxxxxxxxxxxx>
- Date: Fri, 23 Jun 2006 07:29:11 -0500
Adriano,
You should be able to use a rotation to have it draw "bottom to top"
Something like (VB 2005 syntax):
Using font As System.Drawing.Font = New Font("Tahoma", 8,
FontStyle.Regular)
Using brush As System.Drawing.SolidBrush = New
SolidBrush(Color.Gray)
Using format As System.Drawing.StringFormat = New
StringFormat(StringFormatFlags.DirectionVertical)
Dim location As System.Drawing.Point = New
Point(ClientSize.Width \ 2, ClientSize.Height \ 2)
Dim transform As System.Drawing.Drawing2D.Matrix =
e.Graphics.Transform
transform.RotateAt(180, location)
e.Graphics.Transform = transform
e.Graphics.DrawString("This is a test vertical string",
font, brush, location, format)
End Using
End Using
End Using
The quirk is getting the location right. At the rotation causes the
coordinates to be "turned upside down"...
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Adriano" <adriano@xxxxxxx> wrote in message
news:Oq21swmlGHA.1640@xxxxxxxxxxxxxxxxxxxxxxx
| Hello,
|
| the following code draws 'top to bottom' vertical text,
| any ideas how to draw 'bottom to top' one?
| g.DrawString("This is a test vertical string", New Font("Tahoma", 8,
| FontStyle.Regular), New SolidBrush(Color.Gray), 100, 10, New
| StringFormat(StringFormatFlags.DirectionVertical))
|
| I would gratefully appreciate any help
|
| thanks,
| Adriano
|
|
.
- References:
- Drawing vertical string
- From: Adriano
- Drawing vertical string
- Prev by Date: Re: Find out child type in base class call?
- Next by Date: Problems with structure in structure and DLL function call in VB.NET
- Previous by thread: Re: Drawing vertical string
- Next by thread: How to password protect a folder or similar
- Index(es):
Relevant Pages
|