Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/MeasureToolsToolbox.h @ 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 | 52b1c6ff10c5 |
children | 2d8ab34c8c91 |
comparison
equal
deleted
inserted
replaced
1206:c93a6218f0cd | 1209:b5dec783ba08 |
---|---|
29 This function will create a square around the center point supplied in | 29 This function will create a square around the center point supplied in |
30 scene coordinates, with a side length given in canvas coordinates. The | 30 scene coordinates, with a side length given in canvas coordinates. The |
31 square sides are parallel to the canvas boundaries. | 31 square sides are parallel to the canvas boundaries. |
32 */ | 32 */ |
33 void AddSquare(PolylineSceneLayer::Chain& chain, | 33 void AddSquare(PolylineSceneLayer::Chain& chain, |
34 const Scene2D& scene, | 34 const Scene2D& scene, |
35 const ScenePoint2D& centerS, | 35 const ScenePoint2D& centerS, |
36 const double& sideLengthS); | 36 const double& sideLengthS); |
37 | 37 |
38 /** | 38 /** |
39 Creates an arc centered on c that goes | 39 Creates an arc centered on c that goes |
40 - from a point r1: | 40 - from a point r1: |
41 - so that r1 belongs to the p1,c line | 41 - so that r1 belongs to the p1,c line |
121 (N points) | 121 (N points) |
122 | 122 |
123 Warning: the existing chain content will be wiped out. | 123 Warning: the existing chain content will be wiped out. |
124 */ | 124 */ |
125 void AddCircle(PolylineSceneLayer::Chain& chain, | 125 void AddCircle(PolylineSceneLayer::Chain& chain, |
126 const Scene2D& scene, | 126 const ScenePoint2D& centerS, |
127 const ScenePoint2D& centerS, | 127 const double& radiusS, |
128 const double& radiusS, | 128 const int numSubdivisions = 63); |
129 const int numSubdivisions = 63); | |
130 | 129 |
131 /** | 130 /** |
132 Adds or subtracts 2*pi as many times as need to shift the specified | 131 Adds or subtracts 2*pi as many times as need to shift the specified |
133 angle to a value such as: -pi <= value < pi | 132 angle to a value such as: -pi <= value < pi |
134 */ | 133 */ |
144 If the angle is between pi and 2*pi, this means that the shortest arc | 143 If the angle is between pi and 2*pi, this means that the shortest arc |
145 from p1 to p2 is COUNTERclockwise. | 144 from p1 to p2 is COUNTERclockwise. |
146 | 145 |
147 */ | 146 */ |
148 double MeasureAngle( | 147 double MeasureAngle( |
149 const ScenePoint2D& p1 | 148 const ScenePoint2D& p1, const ScenePoint2D& c, const ScenePoint2D& p2); |
150 , const ScenePoint2D& c | |
151 , const ScenePoint2D& p2); | |
152 | 149 |
153 /** | 150 /** |
154 RadiansToDegrees | 151 RadiansToDegrees |
155 */ | 152 */ |
156 double RadiansToDegrees(double angleRad); | 153 double RadiansToDegrees(double angleRad); |