Vertical text

  • Thread starter Thread starter Ken Hunt
  • Start date Start date
K

Ken Hunt

I know how to draw text vertically. My problem is the
StringFormatFlags.DirectionVertical command rotates the text 90 degrees
clockwise. I want it rotated 90 degrees counter-clockwise (I'm making a
y-axis label for a chart). How do you do that? Can you do that??

Ken
 
* "Ken Hunt said:
I know how to draw text vertically. My problem is the
StringFormatFlags.DirectionVertical command rotates the text 90 degrees
clockwise. I want it rotated 90 degrees counter-clockwise (I'm making a
y-axis label for a chart). How do you do that? Can you do that??

Untested:

\\\
Private Sub Form1_Paint( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.PaintEventArgs _
) Handles MyBase.Paint
e.Graphics.RotateTransform(270)
e.Graphics.DrawString("Hello World!", Me.Font, Brushes.Blue, 0, 0)
End Sub
///
 
Hi,

Dim s As String = "Strings at any angle"

e.Graphics.TranslateTransform(20, Me.ClientSize.Height - 20)
e.Graphics.RotateTransform(270)
e.Graphics.DrawString(s, Font, Brushes.Black, 50, 0,
StringFormat.GenericTypographic)


Ken
 
Back
Top