mirror of https://github.com/procxx/kepka.git
QtLottie: Check each layer for visibility by frame.
This commit is contained in:
parent
08ad74da8f
commit
6abf74530d
|
@ -96,7 +96,7 @@ QImage Animation::frame(crl::time now) const {
|
|||
LottieRasterRenderer renderer(&p);
|
||||
for (const auto element : tree.children()) {
|
||||
if (element->active(frame)) {
|
||||
element->render(renderer);
|
||||
element->render(renderer, frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ebd336ec4022c80274101239f13d1f847c759ce5
|
||||
Subproject commit 9ab16cc8fda724421f13656a2f0821abdeac30c7
|
|
@ -88,7 +88,7 @@ public:
|
|||
virtual BMBase *findChild(const QString &childName);
|
||||
|
||||
virtual void updateProperties(int frame);
|
||||
virtual void render(LottieRenderer &renderer) const;
|
||||
virtual void render(LottieRenderer &renderer, int frame) const;
|
||||
|
||||
virtual void resolveAssets(const std::function<BMAsset*(QString)> &resolver);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
QPointF anchorPoint() const;
|
||||
virtual QPointF position() const;
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
bool acceptsTrim() const override;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
void updateProperties(int frame) override;
|
||||
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
QColor color() const;
|
||||
qreal opacity() const;
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
QColor color() const;
|
||||
qreal opacity() const;
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
bool acceptsTrim() const override;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
BMBase *clone() const override;
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
QGradient *value() const;
|
||||
QGradient::Type gradientType() const;
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
void construct(const QJsonObject& definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
bool acceptsTrim() const override;
|
||||
void applyTrim(const BMTrimPath &trimmer) override;
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
void parse(const QJsonObject &definition) override;
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
BMBase *findChild(const QString &childName) override;
|
||||
|
||||
|
@ -75,10 +75,10 @@ public:
|
|||
|
||||
int layerId() const;
|
||||
BMBasicTransform *transform() const;
|
||||
void renderFullTransform(LottieRenderer &renderer) const;
|
||||
void renderFullTransform(LottieRenderer &renderer, int frame) const;
|
||||
|
||||
protected:
|
||||
void renderEffects(LottieRenderer &renderer) const;
|
||||
void renderEffects(LottieRenderer &renderer, int frame) const;
|
||||
|
||||
virtual BMLayer *resolveLinkedLayer();
|
||||
virtual BMLayer *linkedLayer() const;
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
BMBase *clone() const override;
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &render) const override;
|
||||
void render(LottieRenderer &render, int frame) const override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
void applyTrim(BMShape *shape);
|
||||
|
||||
void updateProperties(int frame);
|
||||
void render(LottieRenderer &renderer) const;
|
||||
void render(LottieRenderer &renderer, int frame) const;
|
||||
|
||||
private:
|
||||
BMBase *m_root = nullptr;
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
BMBase *clone() const override;
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
void resolveAssets(const std::function<BMAsset*(QString)> &resolver) override;
|
||||
|
||||
QString refId() const;
|
||||
|
@ -74,7 +74,6 @@ protected:
|
|||
private:
|
||||
QString m_refId;
|
||||
BMBase *m_layers = nullptr;
|
||||
int m_layersFrame = 0;
|
||||
bool m_resolving = false;
|
||||
|
||||
};
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
bool setProperty(BMLiteral::PropertyType propertyType, QVariant value) override;
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
bool acceptsTrim() const override;
|
||||
|
||||
QPointF position() const;
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
void construct(const QJsonObject& definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
int copies() const;
|
||||
qreal offset() const;
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
qreal startOpacity() const;
|
||||
qreal endOpacity() const;
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
bool acceptsTrim() const override;
|
||||
|
||||
QPointF position() const;
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
BMBase *clone() const override;
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &render) const override;
|
||||
void render(LottieRenderer &render, int frame) const override;
|
||||
|
||||
protected:
|
||||
QList<int> m_maskProperties;
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
qreal skew() const;
|
||||
qreal skewAxis() const;
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
BMBase *clone() const override;
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
QPen pen() const;
|
||||
qreal opacity() const;
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
void construct(const QJsonObject &definition);
|
||||
|
||||
void updateProperties(int frame) override;
|
||||
void render(LottieRenderer &renderer) const override;
|
||||
void render(LottieRenderer &renderer, int frame) const override;
|
||||
|
||||
bool acceptsTrim() const override;
|
||||
void applyTrim(const BMTrimPath &trimmer) override;
|
||||
|
|
Loading…
Reference in New Issue