comparison Samples/Common/AngleMeasureTool.cpp @ 654:462a5074f914

Turned the scene into an observable to be able to dynamically react to scene to canvas transform changes --> now the handles and angle measure adornments are immune to zoom changes
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 14 May 2019 13:51:00 +0200
parents 62f6ff016085
children 002d9562c8f5
comparison
equal deleted inserted replaced
653:4eccf698e52f 654:462a5074f914
143 { 143 {
144 //void AddSquare(PolylineSceneLayer::Chain& chain,const Scene2D& scene,const ScenePoint2D& centerS,const double& sideLength) 144 //void AddSquare(PolylineSceneLayer::Chain& chain,const Scene2D& scene,const ScenePoint2D& centerS,const double& sideLength)
145 145
146 { 146 {
147 PolylineSceneLayer::Chain chain; 147 PolylineSceneLayer::Chain chain;
148 AddSquare(chain, GetScene(), side1End_, 10.0); //TODO: take DPI into account 148 AddSquare(chain, GetScene(), side1End_, 10.0* pixelToScene); //TODO: take DPI into account
149 polylineLayer->AddChain(chain, true); 149 polylineLayer->AddChain(chain, true);
150 } 150 }
151 151
152 { 152 {
153 PolylineSceneLayer::Chain chain; 153 PolylineSceneLayer::Chain chain;
154 AddSquare(chain, GetScene(), side2End_, 10.0); //TODO: take DPI into account 154 AddSquare(chain, GetScene(), side2End_, 10.0* pixelToScene); //TODO: take DPI into account
155 polylineLayer->AddChain(chain, true); 155 polylineLayer->AddChain(chain, true);
156 } 156 }
157 } 157 }
158 158
159 // arc 159 // arc