Allow using negative angles with DrawRotatedText. [ patch 1162771 ]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Hock 2005-03-16 05:31:13 +00:00
parent e9626c1b1f
commit c2cb80c865
2 changed files with 4 additions and 0 deletions

View File

@ -1672,6 +1672,8 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
int i_angle = (int) angle;
i_angle = i_angle % 360;
if (i_angle < 0)
i_angle += 360;
int xoffset = 0;
if ((i_angle >= 90.0) && (i_angle < 270.0))
xoffset = image.GetWidth();

View File

@ -1672,6 +1672,8 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
int i_angle = (int) angle;
i_angle = i_angle % 360;
if (i_angle < 0)
i_angle += 360;
int xoffset = 0;
if ((i_angle >= 90.0) && (i_angle < 270.0))
xoffset = image.GetWidth();