Start for Pango 1.6 based text rotation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2004-11-17 21:57:16 +00:00
parent b199de5962
commit c874715013
2 changed files with 34 additions and 0 deletions

View File

@ -1614,6 +1614,22 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
if (!m_window) return;
#if GTK_CHECK_VERSION(2,4,0)
// This code only rotates each individual glyph. Someone
// will have to look up the right way to do this... RR
PangoMatrix matrix = PANGO_MATRIX_INIT;
pango_matrix_rotate( &matrix, angle );
pango_context_set_matrix( m_context, &matrix );
DoDrawText( text, x, y );
pango_context_set_matrix( m_context, NULL );
#else
wxCoord w;
wxCoord h;
@ -1720,6 +1736,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
// update the bounding box
CalcBoundingBox(x + minX, y + minY);
CalcBoundingBox(x + maxX, y + maxY);
#endif // GTK24
}
void wxWindowDC::DoGetTextExtent(const wxString &string,

View File

@ -1614,6 +1614,22 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
if (!m_window) return;
#if GTK_CHECK_VERSION(2,4,0)
// This code only rotates each individual glyph. Someone
// will have to look up the right way to do this... RR
PangoMatrix matrix = PANGO_MATRIX_INIT;
pango_matrix_rotate( &matrix, angle );
pango_context_set_matrix( m_context, &matrix );
DoDrawText( text, x, y );
pango_context_set_matrix( m_context, NULL );
#else
wxCoord w;
wxCoord h;
@ -1720,6 +1736,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
// update the bounding box
CalcBoundingBox(x + minX, y + minY);
CalcBoundingBox(x + maxX, y + maxY);
#endif // GTK24
}
void wxWindowDC::DoGetTextExtent(const wxString &string,