Mercurial > hg > orthanc-stone
comparison Samples/Common/MeasureCommands.h @ 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 | 1e9ed656318e |
children |
comparison
equal
deleted
inserted
replaced
653:4eccf698e52f | 654:462a5074f914 |
---|---|
75 | 75 |
76 class CreateLineMeasureCommand : public CreateMeasureCommand | 76 class CreateLineMeasureCommand : public CreateMeasureCommand |
77 { | 77 { |
78 public: | 78 public: |
79 CreateLineMeasureCommand( | 79 CreateLineMeasureCommand( |
80 Scene2D& scene, MeasureToolList& measureTools, ScenePoint2D point); | 80 MessageBroker& broker, Scene2D& scene, MeasureToolList& measureTools, ScenePoint2D point); |
81 | 81 |
82 // the starting position is set in the ctor | 82 // the starting position is set in the ctor |
83 void SetEnd(ScenePoint2D scenePos); | 83 void SetEnd(ScenePoint2D scenePos); |
84 | 84 |
85 private: | 85 private: |
95 class CreateAngleMeasureCommand : public CreateMeasureCommand | 95 class CreateAngleMeasureCommand : public CreateMeasureCommand |
96 { | 96 { |
97 public: | 97 public: |
98 /** Ctor sets end of side 1*/ | 98 /** Ctor sets end of side 1*/ |
99 CreateAngleMeasureCommand( | 99 CreateAngleMeasureCommand( |
100 Scene2D& scene, MeasureToolList& measureTools, ScenePoint2D point); | 100 MessageBroker& broker, Scene2D& scene, MeasureToolList& measureTools, ScenePoint2D point); |
101 | 101 |
102 /** This method sets center*/ | 102 /** This method sets center*/ |
103 void SetCenter(ScenePoint2D scenePos); | 103 void SetCenter(ScenePoint2D scenePos); |
104 | 104 |
105 /** This method sets end of side 2*/ | 105 /** This method sets end of side 2*/ |