diff OrthancStone/Sources/Scene2D/TextureBaseSceneLayer.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 59f95b9ea858
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2D/TextureBaseSceneLayer.cpp	Thu Oct 29 17:01:29 2020 +0100
+++ b/OrthancStone/Sources/Scene2D/TextureBaseSceneLayer.cpp	Thu Oct 29 17:13:13 2020 +0100
@@ -160,18 +160,14 @@
   }
 
   
-  bool TextureBaseSceneLayer::GetBoundingBox(Extent2D& target) const
+  void TextureBaseSceneLayer::GetBoundingBox(Extent2D& target) const
   {
-    if (texture_.get() == NULL)
-    {
-      return false;
-    }
-    else
+    target.Clear();
+    
+    if (texture_.get() != NULL)
     {
       const AffineTransform2D t = GetTransform();
 
-      target.Reset();
-    
       double x, y;
 
       x = 0;
@@ -193,8 +189,6 @@
       y = static_cast<double>(texture_->GetHeight());
       t.Apply(x, y);
       target.AddPoint(x, y);    
-
-      return true;
     }
   }
 }