Skip to content

Commit

Permalink
rlottie_capi: Add Alpha member in ImageInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
JSUYA authored and smohantty committed Oct 11, 2019
1 parent 4974f78 commit c3ab82e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions inc/rlottiecommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/lottie/lottieitem_capi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c3ab82e

Please sign in to comment.