comparison Framework/Scene2DViewport/MeasureToolsToolbox.h @ 751:712ff6ff3c19

- undo redo now works fine for both measure tool creation commands - added LayerHolder to streamline layer index management - added overloads for ORTHANC_ASSERT with no string message (some heavy preprocessor wizardry in there) - fixing wasm BasicScene is *not* finished.
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 22 May 2019 11:55:52 +0200
parents 8b6adfb62a2f
children 92c400a09f1b
comparison
equal deleted inserted replaced
750:284f37dc1c66 751:712ff6ff3c19
16 * 16 *
17 * You should have received a copy of the GNU Affero General Public License 17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **/ 19 **/
20 20
21 #include <Framework/Scene2D/PolylineSceneLayer.h> 21 #include "../Scene2D/PolylineSceneLayer.h"
22 #include <Framework/Scene2D/Scene2D.h> 22 #include "PointerTypes.h"
23 23
24 namespace OrthancStone 24 namespace OrthancStone
25 { 25 {
26 26
27 /** 27 /**
28 This function will create a square around the center point supplied in 28 This function will create a square around the center point supplied in
29 scene coordinates, with a side length given in canvas coordinates. The 29 scene coordinates, with a side length given in canvas coordinates. The
30 square sides are parallel to the canvas boundaries. 30 square sides are parallel to the canvas boundaries.
31 */ 31 */
32 void AddSquare(PolylineSceneLayer::Chain& chain, 32 void AddSquare(PolylineSceneLayer::Chain& chain,
33 const Scene2D& scene, 33 Scene2DConstPtr scene,
34 const ScenePoint2D& centerS, 34 const ScenePoint2D& centerS,
35 const double& sideLength); 35 const double& sideLengthS);
36
37 36
38 /** 37 /**
39 Creates an arc centered on c that goes 38 Creates an arc centered on c that goes
40 - from a point r1: 39 - from a point r1:
41 - so that r1 belongs to the p1,c line 40 - so that r1 belongs to the p1,c line
47 46
48 Warning: the existing chain content will be wiped out. 47 Warning: the existing chain content will be wiped out.
49 */ 48 */
50 void AddShortestArc( 49 void AddShortestArc(
51 PolylineSceneLayer::Chain& chain 50 PolylineSceneLayer::Chain& chain
52 , const Scene2D& scene
53 , const ScenePoint2D& p1 51 , const ScenePoint2D& p1
54 , const ScenePoint2D& c 52 , const ScenePoint2D& c
55 , const ScenePoint2D& p2 53 , const ScenePoint2D& p2
56 , const double& radiusS 54 , const double& radiusS
57 , const int subdivisionsCount = 63); 55 , const int subdivisionsCount = 63);
62 60
63 Warning: the existing chain content will be wiped out. 61 Warning: the existing chain content will be wiped out.
64 */ 62 */
65 void AddShortestArc( 63 void AddShortestArc(
66 PolylineSceneLayer::Chain& chain 64 PolylineSceneLayer::Chain& chain
67 , const Scene2D& scene
68 , const ScenePoint2D& centerS 65 , const ScenePoint2D& centerS
69 , const double& radiusS 66 , const double& radiusS
70 , const double startAngleRad 67 , const double startAngleRad
71 , const double endAngleRad 68 , const double endAngleRad
72 , const int subdivisionsCount = 63); 69 , const int subdivisionsCount = 63);
180 177
181 The five text layers are supposed to already exist in the scene, starting 178 The five text layers are supposed to already exist in the scene, starting
182 from layerIndex, up to (and not including) layerIndex+5. 179 from layerIndex, up to (and not including) layerIndex+5.
183 */ 180 */
184 void SetTextLayerOutlineProperties( 181 void SetTextLayerOutlineProperties(
185 Scene2D& scene, int baseLayerIndex, const char* text, ScenePoint2D p); 182 Scene2DPtr scene, LayerHolderPtr layerHolder,
186 183 const char* text, ScenePoint2D p);
187 } 184 }