Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp @ 1806:0840a25c6d41
removed hard-coded test in AnnotationsSceneLayer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 20 May 2021 17:11:10 +0200 |
parents | 5a872e69c74f |
children | 79a5838739a6 |
comparison
equal
deleted
inserted
replaced
1805:de7cea710008 | 1806:0840a25c6d41 |
---|---|
1326 AnnotationsSceneLayer::AnnotationsSceneLayer(size_t macroLayerIndex) : | 1326 AnnotationsSceneLayer::AnnotationsSceneLayer(size_t macroLayerIndex) : |
1327 activeTool_(Tool_Edit), | 1327 activeTool_(Tool_Edit), |
1328 macroLayerIndex_(macroLayerIndex), | 1328 macroLayerIndex_(macroLayerIndex), |
1329 polylineSubLayer_(0) // dummy initialization | 1329 polylineSubLayer_(0) // dummy initialization |
1330 { | 1330 { |
1331 annotations_.insert(new SegmentAnnotation(*this, true /* show label */, ScenePoint2D(0, 0), ScenePoint2D(100, 100))); | |
1332 annotations_.insert(new AngleAnnotation(*this, ScenePoint2D(100, 50), ScenePoint2D(150, 40), ScenePoint2D(200, 50))); | |
1333 annotations_.insert(new CircleAnnotation(*this, ScenePoint2D(50, 200), ScenePoint2D(100, 250))); | |
1334 } | 1331 } |
1335 | 1332 |
1336 | 1333 |
1337 void AnnotationsSceneLayer::Clear() | 1334 void AnnotationsSceneLayer::Clear() |
1338 { | 1335 { |
1343 } | 1340 } |
1344 | 1341 |
1345 annotations_.clear(); | 1342 annotations_.clear(); |
1346 } | 1343 } |
1347 | 1344 |
1345 | |
1346 void AnnotationsSceneLayer::AddSegmentAnnotation(const ScenePoint2D& p1, | |
1347 const ScenePoint2D& p2) | |
1348 { | |
1349 annotations_.insert(new SegmentAnnotation(*this, true /* show label */, p1, p2)); | |
1350 } | |
1351 | |
1352 | |
1353 void AnnotationsSceneLayer::AddCircleAnnotation(const ScenePoint2D& p1, | |
1354 const ScenePoint2D& p2) | |
1355 { | |
1356 annotations_.insert(new CircleAnnotation(*this, p1, p2)); | |
1357 } | |
1358 | |
1359 | |
1360 void AnnotationsSceneLayer::AddAngleAnnotation(const ScenePoint2D& p1, | |
1361 const ScenePoint2D& p2, | |
1362 const ScenePoint2D& p3) | |
1363 { | |
1364 annotations_.insert(new AngleAnnotation(*this, p1, p2, p3)); | |
1365 } | |
1366 | |
1348 | 1367 |
1349 void AnnotationsSceneLayer::Render(Scene2D& scene) | 1368 void AnnotationsSceneLayer::Render(Scene2D& scene) |
1350 { | 1369 { |
1351 MacroSceneLayer* macro = NULL; | 1370 MacroSceneLayer* macro = NULL; |
1352 | 1371 |