Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp Thu May 20 17:05:30 2021 +0200 +++ b/OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp Thu May 20 17:11:10 2021 +0200 @@ -1328,9 +1328,6 @@ macroLayerIndex_(macroLayerIndex), polylineSubLayer_(0) // dummy initialization { - annotations_.insert(new SegmentAnnotation(*this, true /* show label */, ScenePoint2D(0, 0), ScenePoint2D(100, 100))); - annotations_.insert(new AngleAnnotation(*this, ScenePoint2D(100, 50), ScenePoint2D(150, 40), ScenePoint2D(200, 50))); - annotations_.insert(new CircleAnnotation(*this, ScenePoint2D(50, 200), ScenePoint2D(100, 250))); } @@ -1346,6 +1343,28 @@ } + void AnnotationsSceneLayer::AddSegmentAnnotation(const ScenePoint2D& p1, + const ScenePoint2D& p2) + { + annotations_.insert(new SegmentAnnotation(*this, true /* show label */, p1, p2)); + } + + + void AnnotationsSceneLayer::AddCircleAnnotation(const ScenePoint2D& p1, + const ScenePoint2D& p2) + { + annotations_.insert(new CircleAnnotation(*this, p1, p2)); + } + + + void AnnotationsSceneLayer::AddAngleAnnotation(const ScenePoint2D& p1, + const ScenePoint2D& p2, + const ScenePoint2D& p3) + { + annotations_.insert(new AngleAnnotation(*this, p1, p2, p3)); + } + + void AnnotationsSceneLayer::Render(Scene2D& scene) { MacroSceneLayer* macro = NULL;