• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.airbnb.lottie;
2 
3 import android.graphics.ColorFilter;
4 import android.graphics.PointF;
5 
6 import com.airbnb.lottie.value.ScaleXY;
7 import com.airbnb.lottie.value.LottieValueCallback;
8 
9 /**
10  * Property values are the same type as the generic type of their corresponding
11  * {@link LottieValueCallback}. With this, we can use generics to maintain type safety
12  * of the callbacks.
13  *
14  * Supported properties:
15  * Transform:
16  *    {@link #TRANSFORM_ANCHOR_POINT}
17  *    {@link #TRANSFORM_POSITION}
18  *    {@link #TRANSFORM_OPACITY}
19  *    {@link #TRANSFORM_SCALE}
20  *    {@link #TRANSFORM_ROTATION}
21  *    {@link #TRANSFORM_SKEW}
22  *    {@link #TRANSFORM_SKEW_ANGLE}
23  *
24  * Fill:
25  *    {@link #COLOR} (non-gradient)
26  *    {@link #OPACITY}
27  *    {@link #COLOR_FILTER}
28  *
29  * Stroke:
30  *    {@link #COLOR} (non-gradient)
31  *    {@link #STROKE_WIDTH}
32  *    {@link #OPACITY}
33  *    {@link #COLOR_FILTER}
34  *
35  * Ellipse:
36  *    {@link #POSITION}
37  *    {@link #ELLIPSE_SIZE}
38  *
39  * Polystar:
40  *    {@link #POLYSTAR_POINTS}
41  *    {@link #POLYSTAR_ROTATION}
42  *    {@link #POSITION}
43  *    {@link #POLYSTAR_INNER_RADIUS} (star)
44  *    {@link #POLYSTAR_OUTER_RADIUS}
45  *    {@link #POLYSTAR_INNER_ROUNDEDNESS} (star)
46  *    {@link #POLYSTAR_OUTER_ROUNDEDNESS}
47  *
48  * Repeater:
49  *    All transform properties
50  *    {@link #REPEATER_COPIES}
51  *    {@link #REPEATER_OFFSET}
52  *    {@link #TRANSFORM_ROTATION}
53  *    {@link #TRANSFORM_START_OPACITY}
54  *    {@link #TRANSFORM_END_OPACITY}
55  *
56  * Layers:
57  *    All transform properties
58  *    {@link #TIME_REMAP} (composition layers only)
59  */
60 public interface LottieProperty {
61   /** ColorInt **/
62   Integer COLOR = 1;
63   Integer STROKE_COLOR = 2;
64   /** Opacity value are 0-100 to match after effects **/
65   Integer TRANSFORM_OPACITY = 3;
66   /** [0,100] */
67   Integer OPACITY = 4;
68   /** In Px */
69   PointF TRANSFORM_ANCHOR_POINT = new PointF();
70   /** In Px */
71   PointF TRANSFORM_POSITION = new PointF();
72   /** In Px */
73   PointF ELLIPSE_SIZE = new PointF();
74   /** In Px */
75   PointF RECTANGLE_SIZE = new PointF();
76   /** In degrees */
77   Float CORNER_RADIUS = 0f;
78   /** In Px */
79   PointF POSITION = new PointF();
80   ScaleXY TRANSFORM_SCALE = new ScaleXY();
81   /** In degrees */
82   Float TRANSFORM_ROTATION = 1f;
83   /** 0-85 */
84   Float TRANSFORM_SKEW = 0f;
85   /** In degrees */
86   Float TRANSFORM_SKEW_ANGLE = 0f;
87   /** In Px */
88   Float STROKE_WIDTH = 2f;
89   Float TEXT_TRACKING = 3f;
90   Float REPEATER_COPIES = 4f;
91   Float REPEATER_OFFSET = 5f;
92   Float POLYSTAR_POINTS = 6f;
93   /** In degrees */
94   Float POLYSTAR_ROTATION = 7f;
95   /** In Px */
96   Float POLYSTAR_INNER_RADIUS = 8f;
97   /** In Px */
98   Float POLYSTAR_OUTER_RADIUS = 9f;
99   /** [0,100] */
100   Float POLYSTAR_INNER_ROUNDEDNESS = 10f;
101   /** [0,100] */
102   Float POLYSTAR_OUTER_ROUNDEDNESS = 11f;
103   /** [0,100] */
104   Float TRANSFORM_START_OPACITY = 12f;
105   /** [0,100] */
106   Float TRANSFORM_END_OPACITY = 12f;
107   /** The time value in seconds */
108   Float TIME_REMAP = 13f;
109   /** In Dp */
110   Float TEXT_SIZE = 14f;
111 
112   ColorFilter COLOR_FILTER = new ColorFilter();
113 
114   Integer[] GRADIENT_COLOR = new Integer[0];
115 }
116