Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/PolylineSceneLayer.cpp @ 632:500c3f70b6c2
- Added a ClearAllChains method to PolylineSceneLayer --> revision must change
when calling it ==> BumpRevision has been added to base class
- Added some docs
= Added GetMinDepth + GetMaxDepth to Scene2D (to alleviate the need for app-
specific "Z depth registry" : clients may simply add a new layer on top or at
the bottom of the existing layer set.
- Added the line tracker measurement tools, commands and trackers. Generic base
classes + Line measure
- started work on the line measure handles
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Thu, 09 May 2019 10:41:31 +0200 |
parents | 434ceeb0bcab |
children | 61ba4b504e9a |
comparison
equal
deleted
inserted
replaced
618:0925b27e8750 | 632:500c3f70b6c2 |
---|---|
40 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | 40 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); |
41 } | 41 } |
42 else | 42 else |
43 { | 43 { |
44 thickness_ = thickness; | 44 thickness_ = thickness; |
45 BumpRevision(); | |
45 } | 46 } |
46 } | 47 } |
47 | 48 |
48 | 49 |
49 void PolylineSceneLayer::Copy(const PolylineSceneLayer& from) | 50 void PolylineSceneLayer::Copy(const PolylineSceneLayer& from) |
50 { | 51 { |
51 SetColor(from.GetRed(), from.GetGreen(), from.GetBlue()); | 52 SetColor(from.GetRed(), from.GetGreen(), from.GetBlue()); |
52 chains_ = from.chains_; | 53 chains_ = from.chains_; |
53 closed_ = from.closed_; | 54 closed_ = from.closed_; |
54 thickness_ = from.thickness_; | 55 thickness_ = from.thickness_; |
56 BumpRevision(); | |
55 } | 57 } |
56 | 58 |
57 | 59 |
58 void PolylineSceneLayer::Reserve(size_t countChains) | 60 void PolylineSceneLayer::Reserve(size_t countChains) |
59 { | 61 { |
67 { | 69 { |
68 if (!chain.empty()) | 70 if (!chain.empty()) |
69 { | 71 { |
70 chains_.push_back(chain); | 72 chains_.push_back(chain); |
71 closed_.push_back(isClosed); | 73 closed_.push_back(isClosed); |
74 BumpRevision(); | |
72 } | 75 } |
73 } | 76 } |
74 | 77 |
78 | |
79 void PolylineSceneLayer::ClearAllChains() | |
80 { | |
81 chains_.clear(); | |
82 closed_.clear(); | |
83 BumpRevision(); | |
84 } | |
75 | 85 |
76 const PolylineSceneLayer::Chain& PolylineSceneLayer::GetChain(size_t i) const | 86 const PolylineSceneLayer::Chain& PolylineSceneLayer::GetChain(size_t i) const |
77 { | 87 { |
78 if (i < chains_.size()) | 88 if (i < chains_.size()) |
79 { | 89 { |