Re: Drawing vertical string

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
|
|


.



Relevant Pages

  • Re: Staining flat boards
    ... just wipe off some in a differential manner. ... to do - flat part of board, dry 5 hours, then do sides, dry for 5 ... of coating on the bottom of the board where the finish slowly ... apply the finish so that my brush is gradually running off the side ...
    (rec.woodworking)
  • Re: Staining flat boards
    ... just wipe off some in a differential manner. ... to do - flat part of board, dry 5 hours, then do sides, dry for 5 ... of coating on the bottom of the board where the finish slowly ... apply the finish so that my brush is gradually running off the side ...
    (rec.woodworking)
  • Re: Success! Re: Cascading paragraphs
    ... I'm suspecting that any version of Word that has the tab ... In fact, trying to draw the ... >> to Format Autoshape. ... space between them at the bottom of the page. ...
    (microsoft.public.word.newusers)
  • Re: Calling all Wacom tablet users - opinions, please
    ... I use Photoshop for editing photos. ... the brush it going to be. ... I can't draw either. ... difficult to use the shoe heel to place the points correctly :-) ...
    (alt.graphics.photoshop)
  • Re: Calling all Wacom tablet users - opinions, please
    ... I use Photoshop for editing photos. ... the brush it going to be. ... I can't draw either. ... difficult to use the shoe heel to place the points correctly :-) ...
    (alt.graphics.photoshop)