10 #define LOT_EXPORT __declspec(dllexport)
15 #define LOT_EXPORT __declspec(dllimport)
20 #define LOT_EXPORT __attribute__((visibility("default")))
30 class LOTPlayerPrivate;
31 #define _LOTPLAYER_DECLARE_PRIVATE(A) \
36 #define ChangeFlagNone 0x0000
37 #define ChangeFlagPath 0x0001
38 #define ChangeFlagPaint 0x0010
39 #define ChangeFlagAll (ChangeFlagPath & ChangeFlagPaint)
41 enum BrushType { BrushSolid, BrushGradient };
42 enum FillRule { EvenOdd, Winding };
43 enum JoinStyle { MiterJoin, BevelJoin, RoundJoin };
44 enum CapStyle { FlatCap, SquareCap, RoundCap };
54 unsigned char r, g, b, a;
68 enum Type { Linear = 1, Radial = 2 };
72 } start, end, center, focal;
87 uint32_t *buffer = nullptr;
96 class LOT_EXPORT LOTPlayer {
101 bool setFilePath(const char *filePath);
103 float playTime() const;
107 const std::vector<LOTNode *> &renderList(float pos) const;
109 // TODO: Consider correct position...
110 void setSize(int width, int height);
111 void size(int &width, int &height) const;
112 std::future<bool> render(float pos, LOTBuffer buffer, bool forceRender = false);
113 bool renderSync(float pos, LOTBuffer buffer, bool forceRender = false);
116 _LOTPLAYER_DECLARE_PRIVATE(LOTPlayer);
119 } // namespace lotplayer
121 #endif // _LOTPLAYER_H_