Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Scene2D/Scene2D.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 |
---|---|
221 | 221 |
222 sceneToCanvas_ = transform; | 222 sceneToCanvas_ = transform; |
223 canvasToScene_ = inverse; | 223 canvasToScene_ = inverse; |
224 } | 224 } |
225 | 225 |
226 void Scene2D::GetBoundingBox(Extent2D &target) const | 226 void Scene2D::GetBoundingBox(Extent2D& target) const |
227 { | 227 { |
228 target.Reset(); | 228 target.Clear(); |
229 | 229 |
230 for (Content::const_iterator it = content_.begin(); | 230 for (Content::const_iterator it = content_.begin(); |
231 it != content_.end(); ++it) | 231 it != content_.end(); ++it) |
232 { | 232 { |
233 assert(it->second != NULL); | 233 assert(it->second != NULL); |
234 | 234 |
235 Extent2D tmp; | 235 Extent2D tmp; |
236 if (it->second->GetLayer().GetBoundingBox(tmp)) | 236 it->second->GetLayer().GetBoundingBox(tmp); |
237 { | 237 target.Union(tmp); |
238 target.Union(tmp); | |
239 } | |
240 } | 238 } |
241 } | 239 } |
242 | 240 |
243 void Scene2D::FitContent(unsigned int canvasWidth, | 241 void Scene2D::FitContent(unsigned int canvasWidth, |
244 unsigned int canvasHeight) | 242 unsigned int canvasHeight) |