rlottie: use correct default opacity value. 25/208525/1 accepted/tizen/unified/20190626.114529 submit/tizen/20190626.023112
authorsubhransu mohanty <sub.mohanty@samsung.com>
Tue, 25 Jun 2019 10:04:11 +0000 (19:04 +0900)
committerHermet Park <hermetpark@gmail.com>
Tue, 25 Jun 2019 11:59:53 +0000 (20:59 +0900)
Change-Id: I9b2012a0951aecb1ead036181fb1f90c50a9bcdd

src/lottie/lottiemodel.h

index 6fe933593e9fa200ad1aabf1d385189721d8c778..2284d25e6acd0602eaa98ecccb58c697b0255521 100644 (file)
@@ -613,7 +613,7 @@ class LOTFillData : public LOTData
 public:
     LOTFillData():LOTData(LOTData::Type::Fill){}
     LottieColor color(int frameNo) const {return mColor.value(frameNo);}
-    float opacity(int frameNo) const {return mOpacity.value(frameNo)/100.0;}
+    float opacity(int frameNo) const {return mOpacity.value(frameNo)/100.0f;}
     FillRule fillRule() const {return mFillRule;}
 public:
     FillRule                       mFillRule{FillRule::Winding}; /* "r" */
@@ -634,7 +634,7 @@ class LOTStrokeData : public LOTData
 public:
     LOTStrokeData():LOTData(LOTData::Type::Stroke){}
     LottieColor color(int frameNo) const {return mColor.value(frameNo);}
-    float opacity(int frameNo) const {return mOpacity.value(frameNo)/100.0;}
+    float opacity(int frameNo) const {return mOpacity.value(frameNo)/100.0f;}
     float strokeWidth(int frameNo) const {return mWidth.value(frameNo);}
     CapStyle capStyle() const {return mCapStyle;}
     JoinStyle joinStyle() const {return mJoinStyle;}
@@ -712,7 +712,7 @@ class LOTGradient : public LOTData
 {
 public:
     explicit LOTGradient(LOTData::Type  type):LOTData(type){}
-    inline float opacity(int frameNo) const {return mOpacity.value(frameNo)/100.0;}
+    inline float opacity(int frameNo) const {return mOpacity.value(frameNo)/100.0f;}
     void update(std::unique_ptr<VGradient> &grad, int frameNo);
 
 private:
@@ -723,7 +723,7 @@ public:
     LOTAnimatable<VPointF>              mEndPoint;            /* "e" */
     LOTAnimatable<float>                mHighlightLength{0};     /* "h" */
     LOTAnimatable<float>                mHighlightAngle{0};      /* "a" */
-    LOTAnimatable<int>                  mOpacity{0};             /* "o" */
+    LOTAnimatable<float>                mOpacity{100};             /* "o" */
     LOTAnimatable<LottieGradient>       mGradient;            /* "g" */
     int                                 mColorPoints{-1};
     bool                                mEnabled{true};      /* "fillEnabled" */
@@ -789,7 +789,7 @@ public:
     bool isStatic() const {return mIsStatic;}
 public:
     LOTAnimatable<LottieShapeData>    mShape;
-    LOTAnimatable<float>              mOpacity;
+    LOTAnimatable<float>              mOpacity{100};
     bool                              mInv{false};
     bool                              mIsStatic{true};
     LOTMaskData::Mode                 mMode;