comparison Framework/Scene2DViewport/MeasureToolsToolbox.cpp @ 1212:ab06dfdf3b75 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 04 Dec 2019 16:54:24 +0100
parents f3bb9a6dd949 b5dec783ba08
children 0ca50d275b9a
comparison
equal deleted inserted replaced
1211:d10d2acb8a02 1212:ab06dfdf3b75
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