diff Framework/Layers/CircleMeasureTracker.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 a7de01c8fd29
children b70e9be013e4
line wrap: on
line diff
--- a/Framework/Layers/CircleMeasureTracker.cpp	Mon Nov 05 10:06:18 2018 +0100
+++ b/Framework/Layers/CircleMeasureTracker.cpp	Mon Nov 05 13:25:03 2018 +0100
@@ -19,12 +19,10 @@
  **/
 
 
-#define _USE_MATH_DEFINES  // To access M_PI in Visual Studio
-#include <cmath>
-
 #include "CircleMeasureTracker.h"
 
 #include <stdio.h>
+#include <boost/math/constants/constants.hpp>
 
 namespace OrthancStone
 {
@@ -66,7 +64,7 @@
     cairo_save(cr);
     cairo_set_line_width(cr, 2.0 / zoom);
     cairo_translate(cr, x, y);
-    cairo_arc(cr, 0, 0, r, 0, 2 * M_PI);
+    cairo_arc(cr, 0, 0, r, 0, 2.0 * boost::math::constants::pi<double>());
     cairo_stroke_preserve(cr);
     cairo_stroke(cr);
     cairo_restore(cr);