rlottie_capi: Add Alpha member in ImageInfo
authorJunsuChoi <jsuya.choi@samsung.com>
Fri, 11 Oct 2019 02:57:09 +0000 (11:57 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 13 Oct 2019 21:29:10 +0000 (06:29 +0900)
inc/rlottiecommon.h
src/lottie/lottieitem_capi.cpp

index 07e751a..f87b5c4 100644 (file)
@@ -161,6 +161,7 @@ typedef struct LOTNode {
         unsigned char *data;
         size_t width;
         size_t height;
+        unsigned char mAlpha;
         struct {
            float m11; float m12; float m13;
            float m21; float m22; float m23;
index f093958..295ed03 100644 (file)
@@ -196,6 +196,9 @@ void LOTImageLayerItem::buildLayerNode()
         lotDrawable->mCNode->mImageInfo.mMatrix.m32 = combinedMatrix().m_ty();
         lotDrawable->mCNode->mImageInfo.mMatrix.m33 = combinedMatrix().m_33();
 
+        // Alpha calculation already combined.
+        lotDrawable->mCNode->mImageInfo.mAlpha = uchar(lotDrawable->mBrush.mTexture->mAlpha);
+
         cnodes().push_back(lotDrawable->mCNode.get());
     }
     clayer().mNodeList.ptr = cnodes().data();