2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef _LOTTIE_COMMON_H_
20 #define _LOTTIE_COMMON_H_
25 #define LOT_EXPORT __declspec(dllexport)
30 #define LOT_EXPORT __declspec(dllimport)
35 #define LOT_EXPORT __attribute__((visibility("default")))
46 * @defgroup Lottie_Animation Lottie_Animation
48 * Lottie Animation is a modern style vector based animation design. Its animation
49 * resource(within json format) could be generated by Adobe After Effect using
50 * bodymovin plugin. You can find a good examples in Lottie Community which
51 * shares many free resources(see: www.lottiefiles.com).
53 * This Lottie_Animation is a common engine to manipulate, control Lottie
54 * Animation from the Lottie resource - json file. It provides a scene-graph
55 * node tree per frames by user demand as well as rasterized frame images.
60 * @ingroup Lottie_Animation
65 * @brief Enumeration for Lottie Player error code.
69 //TODO: Coding convention??
70 LOT_ANIMATION_ERROR_NONE = 0,
71 LOT_ANIMATION_ERROR_NOT_PERMITTED,
72 LOT_ANIMATION_ERROR_OUT_OF_MEMORY,
73 LOT_ANIMATION_ERROR_INVALID_PARAMETER,
74 LOT_ANIMATION_ERROR_RESULT_OUT_OF_RANGE,
75 LOT_ANIMATION_ERROR_ALREADY_IN_PROGRESS,
76 LOT_ANIMATION_ERROR_UNKNOWN
111 typedef struct LOTGradientStop
114 unsigned char r, g, b, a;
125 typedef struct LOTMask {
144 typedef struct LOTNode {
146 #define ChangeFlagNone 0x0000
147 #define ChangeFlagPath 0x0001
148 #define ChangeFlagPaint 0x0010
149 #define ChangeFlagAll (ChangeFlagPath & ChangeFlagPaint)
159 unsigned char r, g, b, a;
163 unsigned char enable;
173 LOTGradientType type;
174 LOTGradientStop *stopPtr;
175 unsigned int stopCount;
178 } start, end, center, focal;
184 LOTBrushType mBrushType;
185 LOTFillRule mFillRule;
190 typedef struct LOTLayerNode {
205 struct LOTLayerNode **ptr;
223 #endif // _LOTTIE_COMMON_H_