K
kurt sune
I am trying to do a rotated font. I get a handle alright which I convert to
a font-object by
Font2 = Font.FromHfont(handleFont)
g.DrawString(Text-to draw, Font2, Brush, CurrentX, CurrentY)
However the font doesnt get rotated.
Anybody any tips?
/k
I create the font thus:
Private Function CustomFont( _
ByVal hgt As Int32, _
ByVal wid As Int32, _
ByVal escapement As Int32, _
ByVal orientation As Int32, _
ByVal wgt As Int32, _
ByVal is_italic As Int32, _
ByVal is_underscored As Int32, _
ByVal is_striken_out As Int32, _
ByVal face As String) As IntPtr
Const CLIP_LH_ANGLES As Int32 = 16
CustomFont = CreateFont( _
hgt, wid, escapement, orientation, wgt, _
is_italic, is_underscored, is_striken_out, _
0, 0, CLIP_LH_ANGLES, 0, 0, face)
End Function
The API-declaration:
Private Declare Auto Function CreateFont Lib "gdi32" _
(ByVal Height As Int32, ByVal Width As Int32, _
ByVal Escapement As Int32, ByVal Orientation As Int32, _
ByVal Weight As Int32, ByVal Italic As Int32, _
ByVal Underline As Int32, ByVal StrikeOut As Int32, _
ByVal CharSet As Int32, ByVal OutPrecision As Int32, _
ByVal ClipPrecision As Int32, ByVal Quality As Int32, _
ByVal PitchAndFamily As Int32, ByVal FaceName As String) As IntPtr
a font-object by
Font2 = Font.FromHfont(handleFont)
g.DrawString(Text-to draw, Font2, Brush, CurrentX, CurrentY)
However the font doesnt get rotated.
Anybody any tips?
/k
I create the font thus:
Private Function CustomFont( _
ByVal hgt As Int32, _
ByVal wid As Int32, _
ByVal escapement As Int32, _
ByVal orientation As Int32, _
ByVal wgt As Int32, _
ByVal is_italic As Int32, _
ByVal is_underscored As Int32, _
ByVal is_striken_out As Int32, _
ByVal face As String) As IntPtr
Const CLIP_LH_ANGLES As Int32 = 16
CustomFont = CreateFont( _
hgt, wid, escapement, orientation, wgt, _
is_italic, is_underscored, is_striken_out, _
0, 0, CLIP_LH_ANGLES, 0, 0, face)
End Function
The API-declaration:
Private Declare Auto Function CreateFont Lib "gdi32" _
(ByVal Height As Int32, ByVal Width As Int32, _
ByVal Escapement As Int32, ByVal Orientation As Int32, _
ByVal Weight As Int32, ByVal Italic As Int32, _
ByVal Underline As Int32, ByVal StrikeOut As Int32, _
ByVal CharSet As Int32, ByVal OutPrecision As Int32, _
ByVal ClipPrecision As Int32, ByVal Quality As Int32, _
ByVal PitchAndFamily As Int32, ByVal FaceName As String) As IntPtr