1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QLOTTIESHAPETRANSFORM_P_H
5#define QLOTTIESHAPETRANSFORM_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QPointF>
19
20#include <QtLottie/private/qlottieshape_p.h>
21#include <QtLottie/private/qlottiebasictransform_p.h>
22#include <QtLottie/private/qlottieproperty_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QJsonObject;
27
28class Q_LOTTIE_EXPORT QLottieShapeTransform : public QLottieBasicTransform
29{
30public:
31 explicit QLottieShapeTransform(const QLottieShapeTransform &other);
32 QLottieShapeTransform(const QJsonObject &definition, QLottieBase *parent);
33
34 QLottieBase *clone() const override;
35
36 void construct(const QJsonObject &definition);
37
38 void updateProperties(int frame) override;
39 void render(QLottieRenderer &renderer) const override;
40
41 qreal skew() const;
42 qreal skewAxis() const;
43 qreal shearX() const;
44 qreal shearY() const;
45 qreal shearAngle() const;
46
47 QLottieProperty<qreal> skewProperty() const { return m_skew; }
48 QLottieProperty<qreal> skewAxisProperty() const { return m_skewAxis; }
49
50protected:
51 QLottieProperty<qreal> m_skew;
52 QLottieProperty<qreal> m_skewAxis;
53 qreal m_shearX = 0;
54 qreal m_shearY = 0;
55 qreal m_shearAngle = 0;
56};
57
58QT_END_NAMESPACE
59
60#endif // QLOTTIESHAPETRANSFORM_P_H
61

source code of qtlottie/src/lottie/qlottieshapetransform_p.h