avoid setting pango matrix when not needed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1412,10 +1412,13 @@ void wxWindowDCImpl::DoDrawRotatedText(const wxString& text, int xLogical, int y
|
|||||||
bg_col = m_textBackgroundColour.GetColor();
|
bg_col = m_textBackgroundColour.GetColor();
|
||||||
|
|
||||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||||
pango_matrix_scale(&matrix, m_scaleX, m_scaleY);
|
if (!wxIsSameDouble(m_scaleX, 1) || !wxIsSameDouble(m_scaleY, 1) || !wxIsNullDouble(angle))
|
||||||
pango_matrix_rotate (&matrix, angle);
|
{
|
||||||
pango_context_set_matrix (m_context, &matrix);
|
pango_matrix_scale(&matrix, m_scaleX, m_scaleY);
|
||||||
pango_layout_context_changed (m_layout);
|
pango_matrix_rotate(&matrix, angle);
|
||||||
|
pango_context_set_matrix(m_context, &matrix);
|
||||||
|
pango_layout_context_changed(m_layout);
|
||||||
|
}
|
||||||
|
|
||||||
int w, h;
|
int w, h;
|
||||||
pango_layout_get_pixel_size(m_layout, &w, &h);
|
pango_layout_get_pixel_size(m_layout, &w, &h);
|
||||||
|
Reference in New Issue
Block a user