rlottie: draw line if width or height is 0 accepted/tizen/unified/20201116.220345 submit/tizen/20201108.215920 submit/tizen/20201115.212153
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 3 Nov 2020 02:22:18 +0000 (11:22 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 8 Nov 2020 21:48:48 +0000 (06:48 +0900)
If width or heigth is 0 rlottie returned without drawing rect.
But it makes sense to draw line even if width or height is 0.

src/vector/vpath.cpp

index f0dbec8ea1d78467a31d6d821c0ef09431821f35..d49cd0094c7edd95da7680cd81d290ae06863934 100644 (file)
@@ -219,13 +219,13 @@ void VPath::VPathData::addOval(const VRectF &rect, VPath::Direction dir)
 
 void VPath::VPathData::addRect(const VRectF &rect, VPath::Direction dir)
 {
-    if (rect.empty()) return;
-
     float x = rect.x();
     float y = rect.y();
     float w = rect.width();
     float h = rect.height();
 
+    if (vCompare(w, 0.f) && vCompare(h, 0.f)) return;
+
     reserve(5, 6);  // 1Move + 4Line + 1Close
     if (dir == VPath::Direction::CW) {
         moveTo(x + w, y);