From fbd24c3c93c708aa74cd2ca032bccf36729f1ab3 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Thu, 27 May 2021 02:49:10 +0200 Subject: [PATCH] common scene: fixing the initial values of variables in the bounds getter The values of the most bottom right corner of the scene bounding box should be initialized with the biggest negative values. Also an empty line removed. --- src/lib/tvgSceneImpl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/tvgSceneImpl.h b/src/lib/tvgSceneImpl.h index 40f1e58f..a83813ca 100644 --- a/src/lib/tvgSceneImpl.h +++ b/src/lib/tvgSceneImpl.h @@ -100,7 +100,6 @@ struct Scene::Impl uint32_t y2 = 0; for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) { - auto region = (*paint)->pImpl->bounds(renderer); //Merge regions @@ -119,8 +118,8 @@ struct Scene::Impl auto x1 = FLT_MAX; auto y1 = FLT_MAX; - auto x2 = 0.0f; - auto y2 = 0.0f; + auto x2 = -FLT_MAX; + auto y2 = -FLT_MAX; for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) { auto x = FLT_MAX;