CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-#temporary for lottie-player dependency.
-CONFIGURE_FILE(${PROJECT_NAME}.pc.in lottie-player.pc)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lottie-player.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
#install header
install(FILES
inc/rlottie.h
inc/rlottie_capi.h
inc/rlottiecommon.h
- inc/lottieanimation.h
DESTINATION include)
#install lib
#include"lottieview.h"
-using namespace lottie;
+using namespace rlottie;
static Eina_Bool
animator(void *data , double pos)
mDirty = true;
auto buffer = (uint32_t *)evas_object_image_data_get(mImage, EINA_TRUE);
size_t bytesperline = evas_object_image_stride_get(mImage);
- lottie::Surface surface(buffer, width, height, bytesperline);
+ rlottie::Surface surface(buffer, width, height, bytesperline);
mRenderTask = mPlayer->render(mCurFrame, surface);
// to force a redraw
evas_object_image_data_update_add(mImage, 0 , 0, surface.width(), surface.height());
} else {
auto buffer = (uint32_t *)evas_object_image_data_get(mImage, EINA_TRUE);
size_t bytesperline = evas_object_image_stride_get(mImage);
- lottie::Surface surface(buffer, width, height, bytesperline);
+ rlottie::Surface surface(buffer, width, height, bytesperline);
mPlayer->renderSync(mCurFrame, surface);
evas_object_image_data_set(mImage, surface.buffer());
evas_object_image_data_update_add(mImage, 0 , 0, surface.width(), surface.height());
Evas_Object *mVg;
int mRepeatCount;
LottieView::RepeatMode mRepeatMode;
- std::unique_ptr<lottie::Animation> mPlayer;
+ std::unique_ptr<rlottie::Animation> mPlayer;
size_t mCurFrame{UINT_MAX};
Ecore_Animator *mAnimator{nullptr};
bool mLoop;
float mPos;
float mFrameRate;
long mTotalFrame;
- std::future<lottie::Surface> mRenderTask;
+ std::future<rlottie::Surface> mRenderTask;
//keep a segment of the animation default is [0, 1]
float mMinProgress{0};
+++ /dev/null
-#include "rlottie.h"
\ No newline at end of file
'rlottie.h',
'rlottie_capi.h',
'rlottiecommon.h',
- 'lottieanimation.h',
])
struct LOTNode;
struct LOTLayerNode;
-namespace lottie {
+namespace rlottie {
class LOT_EXPORT Surface {
public:
-Name: rlottie
+Name: lotti-player
Summary: rlottie ibrary
Version: 0.0.1
Release: 1
%files
%defattr(-,root,root,-)
%{_libdir}/librlottie.so.*
-%manifest %{name}.manifest
+%manifest packaging/rlottie.manifest
%license COPYING licenses/COPYING*
%files devel
%{_libdir}/librlottie.so
%{_libdir}/cmake/rlottie/*.cmake
-%{_libdir}/pkgconfig/lottie-player.pc
%{_libdir}/pkgconfig/rlottie.pc
+++ /dev/null
-<manifest>
- <request>
- <domain name="_"/>
- </request>
-</manifest>
#include "rlottie.h"
#include "vdebug.h"
-using namespace lottie;
+using namespace rlottie;
extern "C" {
{
if (!animation) return;
- lottie::Surface surface(buffer, width, height, bytes_per_line);
+ rlottie::Surface surface(buffer, width, height, bytes_per_line);
animation->mRenderTask = animation->mAnimation->render(frame_number, surface);
animation->mBufferRef = buffer;
}
#include <fstream>
-using namespace lottie;
+using namespace rlottie;
struct RenderTask {
RenderTask() { receiver = sender.get_future(); }
return mRootLayer->layerNode();
}
-bool LOTCompItem::render(const lottie::Surface &surface)
+bool LOTCompItem::render(const rlottie::Surface &surface)
{
VBitmap bitmap(reinterpret_cast<uchar *>(surface.buffer()),
surface.width(), surface.height(),
VSize size() const;
void buildRenderTree();
const LOTLayerNode * renderTree()const;
- bool render(const lottie::Surface &surface);
+ bool render(const rlottie::Surface &surface);
private:
VMatrix mScaleMatrix;
VSize mViewSize;
public:
void SetUp()
{
- animationInvalid = lottie::Animation::loadFromFile("wrong_file.json");
+ animationInvalid = rlottie::Animation::loadFromFile("wrong_file.json");
std::string filePath = DEMO_DIR;
filePath +="mask.json";
- animation = lottie::Animation::loadFromFile(filePath);
+ animation = rlottie::Animation::loadFromFile(filePath);
}
void TearDown()
}
public:
- std::unique_ptr<lottie::Animation> animationInvalid;
- std::unique_ptr<lottie::Animation> animation;
+ std::unique_ptr<rlottie::Animation> animationInvalid;
+ std::unique_ptr<rlottie::Animation> animation;
};
TEST_F(AnimationTest, loadFromFile_N) {