mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-01 00:35:33 +00:00
lottieplayer: code refactoring.
change type to struct and declare type scopes explicitly. Change-Id: If85fbc97917ba324030c3e65765f315e590239ed
This commit is contained in:
committed by
Subhransu Mohanty
parent
adddac6180
commit
9410d9e32d
@@ -65,32 +65,31 @@ public:
|
||||
#define ChangeFlagPaint 0x0010
|
||||
#define ChangeFlagAll (ChangeFlagPath & ChangeFlagPaint)
|
||||
|
||||
class LOT_EXPORT LOTNode {
|
||||
public:
|
||||
struct PathData {
|
||||
const float *ptPtr;
|
||||
int ptCount;
|
||||
const char * elmPtr;
|
||||
int elmCount;
|
||||
};
|
||||
struct Color {
|
||||
unsigned short r, g, b, a;
|
||||
};
|
||||
struct LOTNode {
|
||||
|
||||
enum BrushType { BrushSolid, BrushGradient };
|
||||
enum FillRule { EvenOdd, Winding };
|
||||
|
||||
enum JoinStyle { MiterJoin, BevelJoin, RoundJoin };
|
||||
|
||||
enum CapStyle { FlatCap, SquareCap, RoundCap };
|
||||
|
||||
struct PathData {
|
||||
const float *ptPtr;
|
||||
int ptCount;
|
||||
const char* elmPtr;
|
||||
int elmCount;
|
||||
};
|
||||
|
||||
struct Color {
|
||||
unsigned char r, g, b, a;
|
||||
};
|
||||
|
||||
struct Stroke {
|
||||
bool enable;
|
||||
int width;
|
||||
CapStyle cap;
|
||||
JoinStyle join;
|
||||
int meterLimit;
|
||||
float * dashArray;
|
||||
float* dashArray;
|
||||
int dashArraySize;
|
||||
};
|
||||
|
||||
@@ -99,25 +98,18 @@ public:
|
||||
Gradient::Type type;
|
||||
struct {
|
||||
float x, y;
|
||||
} start, end;
|
||||
struct {
|
||||
float x, y;
|
||||
} center, focal;
|
||||
} start, end, center, focal;
|
||||
float cradius;
|
||||
float fradius;
|
||||
};
|
||||
|
||||
~LOTNode();
|
||||
LOTNode();
|
||||
|
||||
public:
|
||||
int mFlag;
|
||||
LOTNode::BrushType mType;
|
||||
FillRule mFillRule;
|
||||
PathData mPath;
|
||||
Color mColor;
|
||||
Stroke mStroke;
|
||||
Gradient mGradient;
|
||||
int mFlag;
|
||||
BrushType mType;
|
||||
FillRule mFillRule;
|
||||
PathData mPath;
|
||||
Color mColor;
|
||||
Stroke mStroke;
|
||||
Gradient mGradient;
|
||||
};
|
||||
|
||||
#endif // LOTPLAYER_H
|
||||
|
||||
@@ -270,10 +270,6 @@ bool LOTPlayer::renderSync(float pos, LOTBuffer buffer)
|
||||
return d->render(pos, buffer);
|
||||
}
|
||||
|
||||
LOTNode::~LOTNode() {}
|
||||
|
||||
LOTNode::LOTNode() {}
|
||||
|
||||
void initLogging()
|
||||
{
|
||||
#if defined(__ARM_NEON__)
|
||||
|
||||
Reference in New Issue
Block a user