comparison Framework/Scene2DViewport/MeasureToolsToolbox.cpp @ 1209:b5dec783ba08

Fixed the style configurator to only set inversion on the image if it has been explicitely asked by the user + Fixed AddCircle in the measuring toolbox + dummy change (reindent)
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 04 Dec 2019 15:46:14 +0100
parents f6be9412e42a
children ab06dfdf3b75 2d8ab34c8c91
comparison
equal deleted inserted replaced
1206:c93a6218f0cd 1209:b5dec783ba08
63 void AddSquare(PolylineSceneLayer::Chain& chain, 63 void AddSquare(PolylineSceneLayer::Chain& chain,
64 const Scene2D& scene, 64 const Scene2D& scene,
65 const ScenePoint2D& centerS, 65 const ScenePoint2D& centerS,
66 const double& sideLengthS) 66 const double& sideLengthS)
67 { 67 {
68 /*
69 The scene is required here because we need to draw the square with its
70 sides parallel to the SCREEN axis, not the SCENE axis
71 */
72
68 // get the scaling factor 73 // get the scaling factor
69 const double sceneToCanvas = 74 const double sceneToCanvas =
70 scene.GetSceneToCanvasTransform().ComputeZoom(); 75 scene.GetSceneToCanvasTransform().ComputeZoom();
71 76
72 chain.clear(); 77 chain.clear();
202 } 207 }
203 } 208 }
204 #endif 209 #endif
205 210
206 void AddCircle(PolylineSceneLayer::Chain& chain, 211 void AddCircle(PolylineSceneLayer::Chain& chain,
207 const ScenePoint2D& centerS, 212 const ScenePoint2D& centerS,
208 const double& radiusS, 213 const double& radiusS,
209 const int numSubdivisions) 214 const int numSubdivisions)
210 { 215 {
211 //ScenePoint2D centerC = centerS.Apply(scene.GetSceneToCanvasTransform()); 216 //ScenePoint2D centerC = centerS.Apply(scene.GetSceneToCanvasTransform());
212 //TODO: take DPI into account 217 //TODO: take DPI into account
213 218
214 // TODO: automatically compute the number for segments for smooth 219 // TODO: automatically compute the number for segments for smooth