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
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user