comparison OrthancStone/Sources/Scene2D/PolylineSceneLayer.cpp @ 1610:b7630b1a0253

ISceneLayer::GetBoundingBox() returns void
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 29 Oct 2020 17:13:13 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
comparison
equal deleted inserted replaced
1609:5f5c549499ff 1610:b7630b1a0253
91 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 91 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
92 } 92 }
93 } 93 }
94 94
95 95
96 bool PolylineSceneLayer::GetBoundingBox(Extent2D& target) const 96 void PolylineSceneLayer::GetBoundingBox(Extent2D& target) const
97 { 97 {
98 target.Reset(); 98 target.Clear();
99 99
100 for (size_t i = 0; i < items_.size(); i++) 100 for (size_t i = 0; i < items_.size(); i++)
101 { 101 {
102 for (size_t j = 0; j < items_[i].chain_.size(); j++) 102 for (size_t j = 0; j < items_[i].chain_.size(); j++)
103 { 103 {
104 const ScenePoint2D& p = items_[i].chain_[j]; 104 const ScenePoint2D& p = items_[i].chain_[j];
105 target.AddPoint(p.GetX(), p.GetY()); 105 target.AddPoint(p.GetX(), p.GetY());
106 } 106 }
107 } 107 }
108
109 return true;
110 } 108 }
111 } 109 }