Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/AngleMeasureTool.cpp @ 906:52b1c6ff10c5
Disabled OpenGL in GuiAdapter to allow for Cairo-only workflows (THIS IS A TEMP CHANGE!!!) + disabled outlined text by default (build macro)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 17 Jul 2019 17:17:34 +0200 |
parents | 240359ab1651 |
children | ac88989817e3 |
comparison
equal
deleted
inserted
replaced
905:88bf49aebc13 | 906:52b1c6ff10c5 |
---|---|
41 // the params in the LayerHolder ctor specify the number of polyline and text | 41 // the params in the LayerHolder ctor specify the number of polyline and text |
42 // layers | 42 // layers |
43 AngleMeasureTool::AngleMeasureTool( | 43 AngleMeasureTool::AngleMeasureTool( |
44 MessageBroker& broker, boost::weak_ptr<ViewportController> controllerW) | 44 MessageBroker& broker, boost::weak_ptr<ViewportController> controllerW) |
45 : MeasureTool(broker, controllerW) | 45 : MeasureTool(broker, controllerW) |
46 #if ORTHANC_STONE_ENABLE_OUTLINED_TEXT == 1 | |
46 , layerHolder_(boost::make_shared<LayerHolder>(controllerW,1,5)) | 47 , layerHolder_(boost::make_shared<LayerHolder>(controllerW,1,5)) |
48 #else | |
49 , layerHolder_(boost::make_shared<LayerHolder>(controllerW, 1, 1)) | |
50 #endif | |
47 , angleHighlightArea_(AngleHighlightArea_None) | 51 , angleHighlightArea_(AngleHighlightArea_None) |
48 { | 52 { |
49 RefreshScene(); | 53 RefreshScene(); |
50 } | 54 } |
51 | 55 |
291 double angleDeg = RadiansToDegrees(delta); | 295 double angleDeg = RadiansToDegrees(delta); |
292 | 296 |
293 // http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=00B0&mode=hex | 297 // http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=00B0&mode=hex |
294 sprintf(buf, "%0.02f\xc2\xb0", angleDeg); | 298 sprintf(buf, "%0.02f\xc2\xb0", angleDeg); |
295 | 299 |
300 #if ORTHANC_STONE_ENABLE_OUTLINED_TEXT == 1 | |
296 SetTextLayerOutlineProperties( | 301 SetTextLayerOutlineProperties( |
297 GetController()->GetScene(), layerHolder_, buf, ScenePoint2D(pointX, pointY)); | 302 GetController()->GetScene(), layerHolder_, buf, ScenePoint2D(pointX, pointY), 0); |
303 #else | |
304 SetTextLayerProperties( | |
305 GetController()->GetScene(), layerHolder_, buf, ScenePoint2D(pointX, pointY) , 0); | |
306 #endif | |
298 | 307 |
299 #if 0 | 308 #if 0 |
300 // TODO:make it togglable | 309 // TODO:make it togglable |
301 bool enableInfoDisplay = true; | 310 bool enableInfoDisplay = true; |
302 if (enableInfoDisplay) | 311 if (enableInfoDisplay) |