From 503f414edd46512b73e9abee54ff988eca42451e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 15 Sep 1999 14:27:04 +0000 Subject: [PATCH] corrected the bad patch git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 6 ++++-- src/gtk1/dcclient.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 1e91d4b048..d68a6746ee 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -14,7 +14,7 @@ #include "wx/dcclient.h" #include "wx/dcmemory.h" #include "wx/image.h" -#include +#include // for floating-point functions #include "gdk/gdk.h" #include "gtk/gtk.h" @@ -874,7 +874,9 @@ void wxWindowDC::SetPen( const wxPen &pen ) { // X doesn't allow different width in x and y and so we take // the average - double w = 0.5 + (abs((double) XLOG2DEVREL(width)) + abs((double) YL2DEVREL(width))) / 2.0; + double w = 0.5 + + ( fabs((double) XLOG2DEVREL(width)) + + fabs((double) YLOG2DEVREL(width)) ) / 2.0; width = (int)w; } diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 1e91d4b048..d68a6746ee 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -14,7 +14,7 @@ #include "wx/dcclient.h" #include "wx/dcmemory.h" #include "wx/image.h" -#include +#include // for floating-point functions #include "gdk/gdk.h" #include "gtk/gtk.h" @@ -874,7 +874,9 @@ void wxWindowDC::SetPen( const wxPen &pen ) { // X doesn't allow different width in x and y and so we take // the average - double w = 0.5 + (abs((double) XLOG2DEVREL(width)) + abs((double) YL2DEVREL(width))) / 2.0; + double w = 0.5 + + ( fabs((double) XLOG2DEVREL(width)) + + fabs((double) YLOG2DEVREL(width)) ) / 2.0; width = (int)w; } -- 2.50.0