From 3e5a70b5d72ad133913ce6091fb2dc349249cab2 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 12 Aug 2013 16:24:42 +0000 Subject: [PATCH] avoid setting pango matrix when not needed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index eea6d8a389..a11615391e 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1412,10 +1412,13 @@ void wxWindowDCImpl::DoDrawRotatedText(const wxString& text, int xLogical, int y bg_col = m_textBackgroundColour.GetColor(); PangoMatrix matrix = PANGO_MATRIX_INIT; - pango_matrix_scale(&matrix, m_scaleX, m_scaleY); - pango_matrix_rotate (&matrix, angle); - pango_context_set_matrix (m_context, &matrix); - pango_layout_context_changed (m_layout); + if (!wxIsSameDouble(m_scaleX, 1) || !wxIsSameDouble(m_scaleY, 1) || !wxIsNullDouble(angle)) + { + pango_matrix_scale(&matrix, m_scaleX, m_scaleY); + pango_matrix_rotate(&matrix, angle); + pango_context_set_matrix(m_context, &matrix); + pango_layout_context_changed(m_layout); + } int w, h; pango_layout_get_pixel_size(m_layout, &w, &h); -- 2.45.2