From: Dimitri Schoolwerth Date: Sat, 29 May 2004 16:24:12 +0000 (+0000) Subject: applied patch 961026: "Boundbox problem with rotated text" X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a98ca1ae268c0a05784caf4f450e3d7fff382539 applied patch 961026: "Boundbox problem with rotated text" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index f3e5bffa19..d16810f882 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1284,13 +1284,13 @@ void wxDC::DoDrawRotatedText(const wxString& text, // "upper left" and "upper right" CalcBoundingBox(x, y); - CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(h*sin(rad))); + CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad))); // "bottom left" and "bottom right" x += (wxCoord)(h*sin(rad)); y += (wxCoord)(h*cos(rad)); CalcBoundingBox(x, y); - CalcBoundingBox(x + wxCoord(h*sin(rad)), y + wxCoord(h*cos(rad))); + CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad))); } #endif }