rlottie/capi: expose name info of node object accepted/tizen/unified/20200316.220934 submit/tizen/20200313.022654 submit/tizen/20200315.214142
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 10 Mar 2020 10:40:42 +0000 (19:40 +0900)
committerHermet Park <chuneon.park@samsung.com>
Thu, 12 Mar 2020 10:02:09 +0000 (19:02 +0900)
expose the keypath data of nodes such as fill and stroke.

Change-Id: I6d5f45a6cf1694f50b56f719d2d38a330812c575

inc/rlottiecommon.h
src/lottie/lottieitem.cpp
src/lottie/lottieitem_capi.cpp

index 9d067a5..2d2b40d 100644 (file)
@@ -183,6 +183,8 @@ typedef struct LOTNode {
     int       mFlag;
     LOTBrushType mBrushType;
     LOTFillRule  mFillRule;
+
+    const char  *keypath;
 } LOTNode;
 
 
index 95e3953..8586a69 100644 (file)
@@ -1203,6 +1203,7 @@ void LOTPaintDataItem::addPathItems(std::vector<LOTPathDataItem *> &list,
 LOTFillItem::LOTFillItem(LOTFillData *data)
     : LOTPaintDataItem(data->isStatic()), mModel(data)
 {
+    mDrawable.setName(mModel.name());
 }
 
 bool LOTFillItem::updateContent(int frameNo, const VMatrix &, float alpha)
@@ -1220,6 +1221,7 @@ bool LOTFillItem::updateContent(int frameNo, const VMatrix &, float alpha)
 LOTGFillItem::LOTGFillItem(LOTGFillData *data)
     : LOTPaintDataItem(data->isStatic()), mData(data)
 {
+    mDrawable.setName(mData->name());
 }
 
 bool LOTGFillItem::updateContent(int frameNo, const VMatrix &matrix, float alpha)
@@ -1238,6 +1240,7 @@ bool LOTGFillItem::updateContent(int frameNo, const VMatrix &matrix, float alpha
 LOTStrokeItem::LOTStrokeItem(LOTStrokeData *data)
     : LOTPaintDataItem(data->isStatic()), mModel(data)
 {
+    mDrawable.setName(mModel.name());
     if (mModel.hasDashInfo()) {
         mDrawable.setType(VDrawable::Type::StrokeWithDash);
     } else {
@@ -1273,6 +1276,7 @@ bool LOTStrokeItem::updateContent(int frameNo, const VMatrix &matrix, float alph
 LOTGStrokeItem::LOTGStrokeItem(LOTGStrokeData *data)
     : LOTPaintDataItem(data->isStatic()), mData(data)
 {
+    mDrawable.setName(mData->name());
     if (mData->hasDashInfo()) {
         mDrawable.setType(VDrawable::Type::StrokeWithDash);
     } else {
index a6130d8..7d8ea9f 100644 (file)
@@ -244,6 +244,7 @@ void LOTDrawable::sync()
         mCNode->mPath.ptPtr = ptPtr;
         mCNode->mPath.ptCount = 2 * pts.size();
         mCNode->mFlag |= ChangeFlagPath;
+        mCNode->keypath = name();
     }
 
     if (mStrokeInfo) {