Skip to content
OE_subcurve.h 1.18 KiB
Newer Older
3dsman's avatar
3dsman committed
* 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
*/
raoul's avatar
raoul committed
#pragma once

#include "OE_curve.h"
#include <stdint.h>
#include <vector>

raoul's avatar
raoul committed
namespace Pakal { class Arcihve; }

class OE_subcurve : public OE_curve
{
raoul's avatar
raoul committed
	public:
		/** Default constructor */
		OE_subcurve();
		OE_subcurve(OE_curve* curve,float curveStart,float curveEnd, bool reverse);
		/** Default destructor */
		virtual ~OE_subcurve();
raoul's avatar
raoul committed

raoul's avatar
raoul committed
		void persist(Pakal::Archive* archive);
raoul's avatar
raoul committed

		bool setStart(float curveStart);
		bool setEnd(float curveEnd);
raoul's avatar
raoul committed
		bool setReverse(bool curveReverse);
raoul's avatar
raoul committed
		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);
raoul's avatar
raoul committed
		virtual void refreshDependency();
raoul's avatar
raoul committed
	protected:
		OE_curve* curve;
		float start;
		float end;
		bool reverse;