From: Youngbok Shin Date: Fri, 24 Aug 2018 10:27:20 +0000 (+0900) Subject: lottie/vdasher: remove connected dash lines between pathes X-Git-Tag: submit/tizen/20180917.042405~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f86f1bedd7a4df8a5ec82842783019b89a86d3ca;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie/vdasher: remove connected dash lines between pathes Since managing multiple pathes by a painter or a stroke, multiple pathes will be drawn in one "dashed" function call. And its vdasher's moveTo() function only do the job properly when there is only one moveTo call. Now, the moveTo() function initialize internal properties properly. Change-Id: I4dd45d480f27dce734ce2ef8d1ff38774c589e64 --- diff --git a/src/vector/vdasher.cpp b/src/vector/vdasher.cpp index cd7df43..d5f7ba9 100644 --- a/src/vector/vdasher.cpp +++ b/src/vector/vdasher.cpp @@ -70,6 +70,7 @@ VDasher::VDasher(const float *dashArray, int size) void VDasher::moveTo(const VPointF &p) { mIsCurrentOperationGap = false; + mNewSegment = false; mStartPt = p; mCurPt = p; @@ -101,8 +102,7 @@ void VDasher::moveTo(const VPointF &p) normalizeLen -= mDashArray[i].gap; } } else { - mCurrentDashIndex = 0; - mCurrentDashLength = mDashArray[0].length; + mCurrentDashLength = mDashArray[mCurrentDashIndex].length; } } @@ -229,6 +229,7 @@ VPath VDasher::dashed(const VPath &path) if (path.isEmpty()) return VPath(); mDashedPath = VPath(); + mCurrentDashIndex = 0; const std::vector &elms = path.elements(); const std::vector & pts = path.points(); const VPointF * ptPtr = pts.data();