File indexing completed on 2025-02-02 04:11:07
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 "shape.hpp" 0010 0011 #include "model/transform.hpp" 0012 #include "model/property/sub_object_property.hpp" 0013 0014 namespace glaxnimate::model { 0015 0016 class Repeater : public StaticOverrides<Repeater, Modifier> 0017 { 0018 GLAXNIMATE_OBJECT(Repeater) 0019 GLAXNIMATE_SUBOBJECT(Transform, transform) 0020 GLAXNIMATE_ANIMATABLE(int, copies, 1) 0021 GLAXNIMATE_ANIMATABLE(float, start_opacity, 1, {}, 0, 1, false, PropertyTraits::Percent) 0022 GLAXNIMATE_ANIMATABLE(float, end_opacity, 1, {}, 0, 1, false, PropertyTraits::Percent) 0023 0024 public: 0025 using Ctor::Ctor; 0026 0027 static QIcon static_tree_icon(); 0028 static QString static_type_name_human(); 0029 0030 std::unique_ptr<ShapeElement> to_path() const override; 0031 0032 int max_copies() const; 0033 0034 protected: 0035 math::bezier::MultiBezier process(FrameTime t, const math::bezier::MultiBezier& mbez) const override; 0036 void on_paint(QPainter* p, FrameTime t, PaintMode, model::Modifier*) const override; 0037 bool process_collected() const override; 0038 0039 }; 0040 0041 } // namespace glaxnimate::model