From a57a1fb7e07a901a77d00932b6cae8ce4ab55c2e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 8 Aug 2002 10:00:50 +0000 Subject: [PATCH] Applied patch [ 588140 ] User Scaling of Rotated Text on wxGTK The effect of wxDC::SetUserScale() on wxDC::DrawRotatedText() is to scale the text **twice**. The code is in src/gtk/dcclient.cpp The first scaling operation occurs when choosing the GTK font size (as happens for wxDC::DrawText()). The rotated text is scaled a second time when blitting the rotated text bitmap to the DC, in the functions XLOG2DEV(x + dstX) and YLOG2DEV(y + dstY). The supplied patch moves the rotated bitmap co-ords (dstX, dstY) outside of the LOG2DEV functions. bryan cole (bryancole) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 2 +- src/gtk1/dcclient.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 00c939888e..1af1943549 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1557,7 +1557,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, // don't use DrawPoint() because it uses the current pen // colour, and we don't need it here gdk_draw_point( m_window, m_textGC, - XLOG2DEV(x + dstX), YLOG2DEV(y + dstY) ); + XLOG2DEV(x) + dstX, YLOG2DEV(y) + dstY ); } } } diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 00c939888e..1af1943549 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1557,7 +1557,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, // don't use DrawPoint() because it uses the current pen // colour, and we don't need it here gdk_draw_point( m_window, m_textGC, - XLOG2DEV(x + dstX), YLOG2DEV(y + dstY) ); + XLOG2DEV(x) + dstX, YLOG2DEV(y) + dstY ); } } } -- 2.45.2