Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
373:d6136a7e914d | 376:70256a53ff21 |
---|---|
25 #include "../Toolbox/GeometryToolbox.h" | 25 #include "../Toolbox/GeometryToolbox.h" |
26 #include "Framework/Layers/FrameRenderer.h" | 26 #include "Framework/Layers/FrameRenderer.h" |
27 | 27 |
28 #include <Core/Logging.h> | 28 #include <Core/Logging.h> |
29 | 29 |
30 #include <boost/math/constants/constants.hpp> | |
31 | |
32 | |
30 static const double THIN_SLICE_THICKNESS = 100.0 * std::numeric_limits<double>::epsilon(); | 33 static const double THIN_SLICE_THICKNESS = 100.0 * std::numeric_limits<double>::epsilon(); |
31 | 34 |
32 namespace OrthancStone | 35 namespace OrthancStone |
33 { | 36 { |
34 class LayerWidget::Scene : public boost::noncopyable | 37 class LayerWidget::Scene : public boost::noncopyable |
177 | 180 |
178 #if 1 | 181 #if 1 |
179 double s = 5.0 / view.GetZoom(); | 182 double s = 5.0 / view.GetZoom(); |
180 cairo_rectangle(cr, -s, -s, 2.0 * s, 2.0 * s); | 183 cairo_rectangle(cr, -s, -s, 2.0 * s, 2.0 * s); |
181 #else | 184 #else |
182 // TODO Drawing circles makes WebAssembly crash! | 185 // TODO Drawing filled circles makes WebAssembly crash! |
183 cairo_arc(cr, 0, 0, 5.0 / view.GetZoom(), 0, 2 * M_PI); | 186 cairo_arc(cr, 0, 0, 5.0 / view.GetZoom(), 0, 2.0 * boost::math::constants::pi<double>()); |
184 #endif | 187 #endif |
185 | 188 |
186 cairo_set_line_width(cr, 2.0 / view.GetZoom()); | 189 cairo_set_line_width(cr, 2.0 / view.GetZoom()); |
187 cairo_set_source_rgb(cr, 1, 1, 1); | 190 cairo_set_source_rgb(cr, 1, 1, 1); |
188 cairo_stroke_preserve(cr); | 191 cairo_stroke_preserve(cr); |