From: Hermet Park Date: Fri, 9 Nov 2018 11:18:37 +0000 (+0900) Subject: interface: updated Graident structure naming. X-Git-Tag: submit/tizen/20181129.071502~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=557d3ae594d1e1b3303517b8b6fc203617d927cf;p=platform%2Fcore%2Fuifw%2Flottie-player.git interface: updated Graident structure naming. Change-Id: Ib4b316afd353b0c4762c051bae0f3f277393cac2 --- diff --git a/example/lottieview.cpp b/example/lottieview.cpp index bc7eb40..be9f2a1 100644 --- a/example/lottieview.cpp +++ b/example/lottieview.cpp @@ -60,7 +60,7 @@ void LottieView::createVgNode(LOTNode *node, Efl_VG *parent) //evas_vg_shape_stroke_meter_limit_set(shape, node->mStroke.meterLimit); } // update paint info - if (node->mType == LOTBrushType::BrushSolid) { + if (node->mBrushType == LOTBrushType::BrushSolid) { int r = (node->mColor.r * node->mColor.a)/255; int g = (node->mColor.g * node->mColor.a)/255; int b = (node->mColor.b * node->mColor.a)/255; @@ -71,7 +71,7 @@ void LottieView::createVgNode(LOTNode *node, Efl_VG *parent) evas_vg_node_color_set(shape, r, g, b, a); } - } else if (node->mType == LOTBrushType::BrushGradient) { + } else if (node->mBrushType == LOTBrushType::BrushGradient) { //TODO fill the gradient info } } diff --git a/inc/lottiecommon.h b/inc/lottiecommon.h index dd65f9b..48db67e 100644 --- a/inc/lottiecommon.h +++ b/inc/lottiecommon.h @@ -71,11 +71,11 @@ typedef enum GradientRadial } LOTGradientType; -typedef struct +typedef struct LOTGradientStop { float pos; unsigned char r, g, b, a; -}GradientStop; +} LOTGradientStop; typedef struct LOTNode { @@ -107,7 +107,7 @@ typedef struct LOTNode { struct { LOTGradientType type; - GradientStop *stopPtr; + LOTGradientStop *stopPtr; unsigned int stopCount; struct { float x, y; @@ -117,7 +117,7 @@ typedef struct LOTNode { } mGradient; int mFlag; - LOTBrushType mType; + LOTBrushType mBrushType; LOTFillRule mFillRule; } LOTNode; diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index bf9ffac..be40d97 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -998,10 +998,10 @@ static void updateGStops(LOTNode *n, const VGradient *grad) if (n->mGradient.stopCount) free(n->mGradient.stopPtr); n->mGradient.stopCount = grad->mStops.size(); - n->mGradient.stopPtr = (GradientStop *) malloc(n->mGradient.stopCount * sizeof(GradientStop)); + n->mGradient.stopPtr = (LOTGradientStop *) malloc(n->mGradient.stopCount * sizeof(LOTGradientStop)); } - GradientStop *ptr = n->mGradient.stopPtr; + LOTGradientStop *ptr = n->mGradient.stopPtr; for (const auto &i : grad->mStops) { ptr->pos = i.first; ptr->a = i.second.alpha() * grad->alpha(); @@ -1089,14 +1089,14 @@ void LOTDrawable::sync() switch (mBrush.type()) { case VBrush::Type::Solid: - mCNode->mType = LOTBrushType::BrushSolid; + mCNode->mBrushType = LOTBrushType::BrushSolid; mCNode->mColor.r = mBrush.mColor.r; mCNode->mColor.g = mBrush.mColor.g; mCNode->mColor.b = mBrush.mColor.b; mCNode->mColor.a = mBrush.mColor.a; break; case VBrush::Type::LinearGradient: - mCNode->mType = LOTBrushType::BrushGradient; + mCNode->mBrushType = LOTBrushType::BrushGradient; mCNode->mGradient.type = LOTGradientType::GradientLinear; mCNode->mGradient.start.x = mBrush.mGradient->linear.x1; mCNode->mGradient.start.y = mBrush.mGradient->linear.y1; @@ -1105,7 +1105,7 @@ void LOTDrawable::sync() updateGStops(mCNode.get(), mBrush.mGradient); break; case VBrush::Type::RadialGradient: - mCNode->mType = LOTBrushType::BrushGradient; + mCNode->mBrushType = LOTBrushType::BrushGradient; mCNode->mGradient.type = LOTGradientType::GradientRadial; mCNode->mGradient.center.x = mBrush.mGradient->radial.cx; mCNode->mGradient.center.y = mBrush.mGradient->radial.cy;