/* * This file is part of project OpenEmbroidery. It's copyrighted by * the contributors recorded in the version control history of the file. * Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software * * SPDX-License-Identifier: CECILL-2.1 * License-Filename: Licence_CeCILL_V2.1-en.txt */ #pragma once #include "OE_curve.h" #include #include namespace Pakal { class Arcihve; } class OE_subcurve : public OE_curve { public: /** Default constructor */ OE_subcurve(); OE_subcurve(OE_curve* curve,float curveStart,float curveEnd, bool reverse); /** Default destructor */ virtual ~OE_subcurve(); void persist(Pakal::Archive* archive); bool setStart(float curveStart); bool setEnd(float curveEnd); bool setReverse(bool curveReverse); float getStart(); float getEnd(); bool getReverse(); OE_curve* getCurve(); /** \brief check if the curve is valid. */ bool check(); /** \brief refresh the pts array. */ virtual void refresh(float dpi, bool force=false); void delDependency(OE_base * object); virtual void refreshDependency(); protected: OE_curve* curve; float start; float end; bool reverse; };