mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-02 09:06:58 +00:00
lottie/parser: support parsing auto orient property of layer.
Change-Id: Ib7d757d43633d601fd76e8c3393219f7682c9112
This commit is contained in:
@@ -300,6 +300,7 @@ public:
|
||||
int solidWidth() const noexcept{return mSolidLayer.mWidth;}
|
||||
int solidHeight() const noexcept{return mSolidLayer.mHeight;}
|
||||
LottieColor solidColor() const noexcept{return mSolidLayer.mColor;}
|
||||
bool autoOrient() const noexcept{return mAutoOrient;}
|
||||
int timeRemap(int frameNo) const;
|
||||
public:
|
||||
struct SolidLayer {
|
||||
@@ -326,6 +327,7 @@ public:
|
||||
bool mHasRepeater{false};
|
||||
bool mHasGradient{false};
|
||||
bool mRoot{false};
|
||||
bool mAutoOrient{false};
|
||||
std::vector<std::shared_ptr<LOTMaskData>> mMasks;
|
||||
LOTCompositionData *mCompRef;
|
||||
};
|
||||
|
||||
@@ -791,6 +791,8 @@ std::shared_ptr<LOTData> LottieParserImpl::parseLayer()
|
||||
layer->mHasMask = GetBool();
|
||||
} else if (0 == strcmp(key, "masksProperties")) {
|
||||
parseMaskProperty(layer);
|
||||
} else if (0 == strcmp(key, "ao")) {
|
||||
layer->mAutoOrient = GetInt();
|
||||
} else {
|
||||
#ifdef DEBUG_PARSER
|
||||
vWarning << "Layer Attribute Skipped : " << key;
|
||||
@@ -1206,7 +1208,7 @@ std::shared_ptr<LOTTransformData> LottieParserImpl::parseTransformObject()
|
||||
parseProperty(obj->mSkewAxis);
|
||||
} else if (0 == strcmp(key, "o")) {
|
||||
parseProperty(obj->mOpacity);
|
||||
} else if (0 == strcmp(key, "hd")) {
|
||||
} else if (0 == strcmp(key, "hd")) {
|
||||
obj->mHidden = GetBool();
|
||||
} else {
|
||||
Skip(key);
|
||||
@@ -1916,6 +1918,7 @@ public:
|
||||
<< ", outFm:" << obj->mOutFrame
|
||||
<< ", stFm:" << obj->mStartFrame
|
||||
<< ", ts:" << obj->mTimeStreatch
|
||||
<< ", ao:" << obj->autoOrient()
|
||||
<< "\n";
|
||||
visitChildren(static_cast<LOTGroupData *>(obj), level);
|
||||
vDebug << level
|
||||
|
||||
Reference in New Issue
Block a user