LOT_EXPORT size_t lottie_animation_get_node_count(const Lottie_Animation *animation);
LOT_EXPORT const LOTNode* lottie_animation_get_node(Lottie_Animation *animation, size_t idx);
+
+/*
+ * Get the render tree which contains the snapshot of the animation object at frame $frame_number
+ * frame_number, the content of the animation in that frame number
+ * width , width of the viewbox
+ * height , height of the viewbox
+ *
+ * PS : user has to traverse the tree for rendering. @see LOTLayerNode and @see LOTNode
+ */
+LOT_EXPORT const LOTLayerNode * lottie_animation_render_tree(Lottie_Animation *animation,
+ size_t frameNo,
+ size_t w, size_t h);
+
/*
* Request to render the content of the frame $frame_number to buffer $buffer asynchronously.
* frame_number, the frame number needs to be rendered.
return animation->mAnimation->renderList(animation->mFrameNo, animation->mWidth, animation->mHeight)[idx];
}
+LOT_EXPORT const LOTLayerNode * lottie_animation_render_tree(Lottie_Animation_S *animation, size_t frameNo, size_t w, size_t h)
+{
+ if (!animation) return nullptr;
+
+ animation->mFrameNo = frameNo;
+ animation->mWidth = w;
+ animation->mHeight = h;
+ return animation->mAnimation->renderTree(frameNo, w, h);
+}
+
LOT_EXPORT void
lottie_animation_render_async(Lottie_Animation_S *animation,
size_t frame_number,