X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f66f6a5b3583b02c34854556eb83e3a808524ce..e4097f77c440b1f31a80fe273cc732c14d606096:/src/gtk/dcclient.cpp diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index eea6d8a389..2c4a716964 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); @@ -1986,7 +1989,7 @@ void wxWindowDCImpl::ComputeScaleAndOrigin() wxDCImpl::ComputeScaleAndOrigin(); - // if scale has changed call SetPen to recalulate the line width + // if scale has changed call SetPen to recalculate the line width if ( wxRealPoint(m_scaleX, m_scaleY) != origScale && m_pen.IsOk() ) { // this is a bit artificial, but we need to force wxDC to think the pen