1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QLOTTIESTROKE_P_H
5#define QLOTTIESTROKE_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 <QPen>
19#include <QVector4D>
20
21#include <QtLottie/private/qlottieshape_p.h>
22#include <QtLottie/private/qlottieproperty_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class Q_LOTTIE_EXPORT QLottieStroke : public QLottieShape
27{
28public:
29 QLottieStroke() = default;
30 explicit QLottieStroke(const QLottieStroke &other);
31 QLottieStroke(const QJsonObject &definition, QLottieBase *parent = nullptr);
32
33 QLottieBase *clone() const override;
34
35 void updateProperties(int frame) override;
36 void render(QLottieRenderer &renderer) const override;
37
38 QPen pen() const;
39 qreal opacity() const;
40
41protected:
42 QColor getColor() const;
43
44protected:
45 QLottieProperty<qreal> m_opacity;
46 QLottieProperty<qreal> m_width;
47 QLottieProperty4D<QVector4D> m_color;
48 Qt::PenCapStyle m_capStyle;
49 Qt::PenJoinStyle m_joinStyle;
50 qreal m_miterLimit = 0;
51 QLottieProperty<qreal> m_dashOffset;
52 QLottieProperty<qreal> m_dashLength;
53 QLottieProperty<qreal> m_dashGap;
54 bool m_isDashed = false;
55};
56
57QT_END_NAMESPACE
58
59#endif // QLOTTIESTROKE_P_H
60

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