From: Shinwoo Kim Date: Tue, 3 Nov 2020 02:22:18 +0000 (+0900) Subject: rlottie: draw line if width or height is 0 X-Git-Tag: submit/tizen/20201108.215920^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5aed123ef700c79c26b4597ebda4cc62b621f2be;p=platform%2Fcore%2Fuifw%2Flottie-player.git rlottie: draw line if width or height is 0 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. --- diff --git a/src/vector/vpath.cpp b/src/vector/vpath.cpp index f0dbec8..d49cd00 100644 --- a/src/vector/vpath.cpp +++ b/src/vector/vpath.cpp @@ -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);