From 4ac717880c4fb7a965795ddbccebb9793a2f1c98 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 9 Oct 2003 19:59:14 +0000 Subject: [PATCH] Rounding error. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 2 +- src/gtk1/dcclient.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 6f377fde56..95b26e9cc1 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1453,7 +1453,7 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y ) pango_layout_set_text( layout, (const char*)data, strlen((const char*)data) ); - if (m_scaleY - 1.0 < 0.00001) + if (abs(m_scaleY - 1.0) < 0.00001) { // If there is a user or actually any scale applied to // the device context, scale the font. diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 6f377fde56..95b26e9cc1 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1453,7 +1453,7 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y ) pango_layout_set_text( layout, (const char*)data, strlen((const char*)data) ); - if (m_scaleY - 1.0 < 0.00001) + if (abs(m_scaleY - 1.0) < 0.00001) { // If there is a user or actually any scale applied to // the device context, scale the font.