diff options
author | subhransu mohanty <sub.mohanty@samsung.com> | 2017-12-20 14:12:03 +0900 |
---|---|---|
committer | subhransu mohanty <sub.mohanty@samsung.com> | 2018-04-12 13:51:52 +0900 |
commit | 48fa47e5ffbc3502d6c031159373e43450d310e1 (patch) | |
tree | 4dd01fc629f3c1155c39d8f19693ae2e363ada36 | |
parent | 7fc9a6060c71b6781f948a3d4e3f9c378cdd4062 (diff) | |
download | efl-48fa47e5ffbc3502d6c031159373e43450d310e1.tar.gz |
lottie: make all path objects derive from drawable object.
-rw-r--r-- | ssg/src/lottie/lottiemodel.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/ssg/src/lottie/lottiemodel.h b/ssg/src/lottie/lottiemodel.h index 29e8fbe65b..8b6c562207 100644 --- a/ssg/src/lottie/lottiemodel.h +++ b/ssg/src/lottie/lottiemodel.h @@ -279,25 +279,34 @@ public: std::shared_ptr<LottieShapeData> mShapeData; }; -class LottieShapeObject : public LottieObject +class LottieDrawableObject : public LottieObject +{ +public: + LottieDrawableObject(LottieObject::Type type):LottieObject(type){} +public: + std::vector<std::shared_ptr<LottieObject>> mPathOperations; + std::vector<std::shared_ptr<LottieObject>> mPaintOperations; +}; + +class LottieShapeObject : public LottieDrawableObject { public: void accept(LottieObjectVisitor *visitor) final {visitor->visit(this);} void process(); - LottieShapeObject():LottieObject(LottieObject::Type::Shape){} + LottieShapeObject():LottieDrawableObject(LottieObject::Type::Shape){} LottieObject *copy() {return new LottieShapeObject(*this);} public: LottieAnimatable<LottieShape> mShape; bool mClosed = false; }; -class LottieRectObject : public LottieObject +class LottieRectObject : public LottieDrawableObject { public: void accept(LottieObjectVisitor *visitor) final {visitor->visit(this);} - LottieRectObject():LottieObject(LottieObject::Type::Rect), + LottieRectObject():LottieDrawableObject(LottieObject::Type::Rect), mPos(SGPointF(0,0)), mSize(SGPointF(0,0)), mRound(0){} @@ -308,12 +317,12 @@ public: LottieAnimatable<float> mRound; }; -class LottieEllipseObject : public LottieObject +class LottieEllipseObject : public LottieDrawableObject { public: void accept(LottieObjectVisitor *visitor) final {visitor->visit(this);} - LottieEllipseObject():LottieObject(LottieObject::Type::Ellipse), + LottieEllipseObject():LottieDrawableObject(LottieObject::Type::Ellipse), mPos(SGPointF(0,0)), mSize(SGPointF(0,0)){} LottieObject *copy() {return new LottieEllipseObject(*this);} |