File indexing completed on 2025-02-02 04:11:08

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 "path_modifier.hpp"
0010 
0011 namespace glaxnimate::model {
0012 
0013 class Trim : public StaticOverrides<Trim, PathModifier>
0014 {
0015     GLAXNIMATE_OBJECT(Trim)
0016     GLAXNIMATE_ANIMATABLE(float, start, 0, {}, 0, 1, false, PropertyTraits::Percent)
0017     GLAXNIMATE_ANIMATABLE(float, end, 1, {}, 0, 1, false, PropertyTraits::Percent)
0018     GLAXNIMATE_ANIMATABLE(float, offset, 0, {}, std::numeric_limits<float>::lowest(), std::numeric_limits<float>::max(), false, PropertyTraits::Percent)
0019 
0020 public:
0021     enum MultipleShapes
0022     {
0023         Individually = 1,
0024         Simultaneously = 2,
0025     };
0026 
0027     Q_ENUM(MultipleShapes)
0028 
0029     GLAXNIMATE_PROPERTY(MultipleShapes, multiple, Individually, {}, {}, PropertyTraits::Visual)
0030 
0031 
0032 public:
0033     using Ctor::Ctor;
0034 
0035     static QIcon static_tree_icon();
0036     static QString static_type_name_human();
0037 
0038     math::bezier::MultiBezier process(FrameTime t, const math::bezier::MultiBezier& mbez) const override;
0039 
0040 protected:
0041     bool process_collected() const override;
0042 
0043 };
0044 
0045 } // namespace glaxnimate::model
0046