#if defined _WIN32 || defined __CYGWIN__
#ifdef LOT_BUILD
- #define LOT_EXPORT __declspec(dllexport)
+ #define RLOTTIE_API __declspec(dllexport)
#else
- #define LOT_EXPORT __declspec(dllimport)
+ #define RLOTTIE_API __declspec(dllimport)
#endif
#else
#ifdef LOT_BUILD
- #define LOT_EXPORT __attribute__ ((visibility ("default")))
+ #define RLOTTIE_API __attribute__ ((visibility ("default")))
#else
- #define LOT_EXPORT
+ #define RLOTTIE_API
#endif
#endif
*
* @internal
*/
-LOT_EXPORT void configureModelCacheSize(size_t cacheSize);
+RLOTTIE_API void configureModelCacheSize(size_t cacheSize);
struct Color {
Color() = default;
struct Float_Type{};
template <typename T> struct MapType;
-class LOT_EXPORT Surface {
+class RLOTTIE_API Surface {
public:
/**
* @brief Surface object constructor.
using ColorFilter = std::function<void(float &r , float &g, float &b)>;
-class LOT_EXPORT Animation {
+class RLOTTIE_API Animation {
public:
/**
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT Lottie_Animation *lottie_animation_from_file(const char *path);
+RLOTTIE_API Lottie_Animation *lottie_animation_from_file(const char *path);
/**
* @brief Constructs an animation object from JSON string data.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT Lottie_Animation *lottie_animation_from_data(const char *data, const char *key, const char *resource_path);
+RLOTTIE_API Lottie_Animation *lottie_animation_from_data(const char *data, const char *key, const char *resource_path);
/**
* @brief Free given Animation object resource.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT void lottie_animation_destroy(Lottie_Animation *animation);
+RLOTTIE_API void lottie_animation_destroy(Lottie_Animation *animation);
/**
* @brief Returns default viewport size of the Lottie resource.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT void lottie_animation_get_size(const Lottie_Animation *animation, size_t *width, size_t *height);
+RLOTTIE_API void lottie_animation_get_size(const Lottie_Animation *animation, size_t *width, size_t *height);
/**
* @brief Returns total animation duration of Lottie resource in second.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT double lottie_animation_get_duration(const Lottie_Animation *animation);
+RLOTTIE_API double lottie_animation_get_duration(const Lottie_Animation *animation);
/**
* @brief Returns total number of frames present in the Lottie resource.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT size_t lottie_animation_get_totalframe(const Lottie_Animation *animation);
+RLOTTIE_API size_t lottie_animation_get_totalframe(const Lottie_Animation *animation);
/**
* @brief Returns default framerate of the Lottie resource.
* @internal
*
*/
-LOT_EXPORT double lottie_animation_get_framerate(const Lottie_Animation *animation);
+RLOTTIE_API double lottie_animation_get_framerate(const Lottie_Animation *animation);
/**
* @brief Get the render tree which contains the snapshot of the animation object
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT const LOTLayerNode *lottie_animation_render_tree(Lottie_Animation *animation, size_t frame_num, size_t width, size_t height);
+RLOTTIE_API const LOTLayerNode *lottie_animation_render_tree(Lottie_Animation *animation, size_t frame_num, size_t width, size_t height);
/**
* @brief Maps position to frame number and returns it.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT size_t lottie_animation_get_frame_at_pos(const Lottie_Animation *animation, float pos);
+RLOTTIE_API size_t lottie_animation_get_frame_at_pos(const Lottie_Animation *animation, float pos);
/**
* @brief Request to render the content of the frame @p frame_num to buffer @p buffer.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT void lottie_animation_render(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
+RLOTTIE_API void lottie_animation_render(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
/**
* @brief Request to render the content of the frame @p frame_num to buffer @p buffer asynchronously.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT void lottie_animation_render_async(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
+RLOTTIE_API void lottie_animation_render_async(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
/**
* @brief Request to finish the current async renderer job for this animation object.
* @ingroup Lottie_Animation
* @internal
*/
-LOT_EXPORT uint32_t *lottie_animation_render_flush(Lottie_Animation *animation);
+RLOTTIE_API uint32_t *lottie_animation_render_flush(Lottie_Animation *animation);
/**
* @ingroup Lottie_Animation
* @internal
* */
-LOT_EXPORT void lottie_animation_property_override(Lottie_Animation *animation, const Lottie_Animation_Property type, const char *keypath, ...);
+RLOTTIE_API void lottie_animation_property_override(Lottie_Animation *animation, const Lottie_Animation_Property type, const char *keypath, ...);
/**
* @ingroup Lottie_Animation
* @internal
* */
-LOT_EXPORT const LOTMarkerList* lottie_animation_get_markerlist(Lottie_Animation *animation);
+RLOTTIE_API const LOTMarkerList* lottie_animation_get_markerlist(Lottie_Animation *animation);
#ifdef __cplusplus
}
#if defined _WIN32 || defined __CYGWIN__
#ifdef LOT_BUILD
- #define LOT_EXPORT __declspec(dllexport)
+ #define RLOTTIE_API __declspec(dllexport)
#else
- #define LOT_EXPORT __declspec(dllimport)
+ #define RLOTTIE_API __declspec(dllimport)
#endif
#else
#ifdef LOT_BUILD
- #define LOT_EXPORT __attribute__ ((visibility ("default")))
+ #define RLOTTIE_API __attribute__ ((visibility ("default")))
#else
- #define LOT_EXPORT
+ #define RLOTTIE_API
#endif
#endif
LOTMarkerList *mMarkerList;
};
-LOT_EXPORT Lottie_Animation_S *lottie_animation_from_file(const char *path)
+RLOTTIE_API Lottie_Animation_S *lottie_animation_from_file(const char *path)
{
if (auto animation = Animation::loadFromFile(path) ) {
Lottie_Animation_S *handle = new Lottie_Animation_S();
}
}
-LOT_EXPORT Lottie_Animation_S *lottie_animation_from_data(const char *data, const char *key, const char *resourcePath)
+RLOTTIE_API Lottie_Animation_S *lottie_animation_from_data(const char *data, const char *key, const char *resourcePath)
{
if (auto animation = Animation::loadFromData(data, key, resourcePath) ) {
Lottie_Animation_S *handle = new Lottie_Animation_S();
}
}
-LOT_EXPORT void lottie_animation_destroy(Lottie_Animation_S *animation)
+RLOTTIE_API void lottie_animation_destroy(Lottie_Animation_S *animation)
{
if (animation) {
if (animation->mMarkerList) {
}
}
-LOT_EXPORT void lottie_animation_get_size(const Lottie_Animation_S *animation, size_t *width, size_t *height)
+RLOTTIE_API void lottie_animation_get_size(const Lottie_Animation_S *animation, size_t *width, size_t *height)
{
if (!animation) return;
animation->mAnimation->size(*width, *height);
}
-LOT_EXPORT double lottie_animation_get_duration(const Lottie_Animation_S *animation)
+RLOTTIE_API double lottie_animation_get_duration(const Lottie_Animation_S *animation)
{
if (!animation) return 0;
return animation->mAnimation->duration();
}
-LOT_EXPORT size_t lottie_animation_get_totalframe(const Lottie_Animation_S *animation)
+RLOTTIE_API size_t lottie_animation_get_totalframe(const Lottie_Animation_S *animation)
{
if (!animation) return 0;
}
-LOT_EXPORT double lottie_animation_get_framerate(const Lottie_Animation_S *animation)
+RLOTTIE_API double lottie_animation_get_framerate(const Lottie_Animation_S *animation)
{
if (!animation) return 0;
return animation->mAnimation->frameRate();
}
-LOT_EXPORT const LOTLayerNode * lottie_animation_render_tree(Lottie_Animation_S *animation, size_t frame_num, size_t width, size_t height)
+RLOTTIE_API const LOTLayerNode * lottie_animation_render_tree(Lottie_Animation_S *animation, size_t frame_num, size_t width, size_t height)
{
if (!animation) return nullptr;
return animation->mAnimation->renderTree(frame_num, width, height);
}
-LOT_EXPORT size_t
+RLOTTIE_API size_t
lottie_animation_get_frame_at_pos(const Lottie_Animation_S *animation, float pos)
{
if (!animation) return 0;
return animation->mAnimation->frameAtPos(pos);
}
-LOT_EXPORT void
+RLOTTIE_API void
lottie_animation_render(Lottie_Animation_S *animation,
size_t frame_number,
uint32_t *buffer,
animation->mAnimation->renderSync(frame_number, surface);
}
-LOT_EXPORT void
+RLOTTIE_API void
lottie_animation_render_async(Lottie_Animation_S *animation,
size_t frame_number,
uint32_t *buffer,
animation->mBufferRef = buffer;
}
-LOT_EXPORT uint32_t *
+RLOTTIE_API uint32_t *
lottie_animation_render_flush(Lottie_Animation_S *animation)
{
if (!animation) return nullptr;
return animation->mBufferRef;
}
-LOT_EXPORT void
+RLOTTIE_API void
lottie_animation_property_override(Lottie_Animation_S *animation,
const Lottie_Animation_Property type,
const char *keypath,
}
}
-LOT_EXPORT const LOTMarkerList*
+RLOTTIE_API const LOTMarkerList*
lottie_animation_get_markerlist(Lottie_Animation_S *animation)
{
if (!animation) return nullptr;
using namespace rlottie;
using namespace rlottie::internal;
-LOT_EXPORT void rlottie::configureModelCacheSize(size_t cacheSize)
+RLOTTIE_API void rlottie::configureModelCacheSize(size_t cacheSize)
{
internal::model::configureModelCacheSize(cacheSize);
}
#if defined _WIN32 || defined __CYGWIN__
#ifdef LOT_BUILD
- #define LOT_EXPORT __declspec(dllexport)
+ #define RLOTTIE_API __declspec(dllexport)
#else
- #define LOT_EXPORT __declspec(dllimport)
+ #define RLOTTIE_API __declspec(dllimport)
#endif
#else
#ifdef LOT_BUILD
- #define LOT_EXPORT __attribute__ ((visibility ("default")))
+ #define RLOTTIE_API __attribute__ ((visibility ("default")))
#else
- #define LOT_EXPORT
+ #define RLOTTIE_API
#endif
#endif
* exported function wrapper from the library
*/
-LOT_EXPORT unsigned char *lottie_image_load(char const *filename, int *x,
+RLOTTIE_API unsigned char *lottie_image_load(char const *filename, int *x,
int *y, int *comp, int req_comp)
{
return stbi_load(filename, x, y, comp, req_comp);
}
-LOT_EXPORT unsigned char *lottie_image_load_from_data(const char *imageData,
+RLOTTIE_API unsigned char *lottie_image_load_from_data(const char *imageData,
int len, int *x, int *y,
int *comp, int req_comp)
{
return stbi_load_from_memory(data, len, x, y, comp, req_comp);
}
-LOT_EXPORT void lottie_image_free(unsigned char *data)
+RLOTTIE_API void lottie_image_free(unsigned char *data)
{
stbi_image_free(data);
}