diff Framework/Widgets/LayerWidget.cpp @ 376:70256a53ff21

fix compatibility with Visual Studio 2008
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 05 Nov 2018 13:25:03 +0100
parents b10dfdb96866
children 8eb4fe74000f
line wrap: on
line diff
--- a/Framework/Widgets/LayerWidget.cpp	Mon Nov 05 10:06:18 2018 +0100
+++ b/Framework/Widgets/LayerWidget.cpp	Mon Nov 05 13:25:03 2018 +0100
@@ -27,6 +27,9 @@
 
 #include <Core/Logging.h>
 
+#include <boost/math/constants/constants.hpp>
+
+
 static const double THIN_SLICE_THICKNESS = 100.0 * std::numeric_limits<double>::epsilon();
 
 namespace OrthancStone
@@ -179,8 +182,8 @@
         double s = 5.0 / view.GetZoom();
         cairo_rectangle(cr, -s, -s, 2.0 * s, 2.0 * s);
 #else
-        // TODO Drawing circles makes WebAssembly crash!
-        cairo_arc(cr, 0, 0, 5.0 / view.GetZoom(), 0, 2 * M_PI);
+        // TODO Drawing filled circles makes WebAssembly crash!
+        cairo_arc(cr, 0, 0, 5.0 / view.GetZoom(), 0, 2.0 * boost::math::constants::pi<double>());
 #endif
         
         cairo_set_line_width(cr, 2.0 / view.GetZoom());