Warning, file /graphics/glaxnimate/src/core/model/transform.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include "model/animation/animatable.hpp"
0010 #include "model/object.hpp"
0011 
0012 #include <QTransform>
0013 
0014 
0015 namespace glaxnimate::model {
0016 
0017 
0018 class Transform : public Object
0019 {
0020     GLAXNIMATE_OBJECT(Transform)
0021     GLAXNIMATE_ANIMATABLE(QPointF, anchor_point, QPointF(0, 0))
0022     GLAXNIMATE_ANIMATABLE(QPointF, position, QPointF(0, 0))
0023     GLAXNIMATE_ANIMATABLE(QVector2D, scale, QVector2D(1, 1))
0024     GLAXNIMATE_ANIMATABLE(float, rotation, 0, {})
0025 
0026 public:
0027     using Object::Object;
0028 
0029     virtual QString type_name_human() const override { return i18n("Transform"); }
0030 
0031     QTransform transform_matrix(FrameTime f, bool auto_orient = false) const;
0032     void set_transform_matrix(const QTransform& t);
0033     void copy(Transform* other);
0034 };
0035 
0036 
0037 
0038 } // namespace glaxnimate::model