common scene: fixing the initial values of variables in the bounds getter
authorMira Grudzinska <m.grudzinska@samsung.com>
Thu, 27 May 2021 00:49:10 +0000 (02:49 +0200)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 27 May 2021 09:04:03 +0000 (18:04 +0900)
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

index 40f1e58..a83813c 100644 (file)
@@ -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;