openEmbroider  0.1
an open source embroidery software
OE_subcurve.h
1 /*
2  * Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
3  *
4  * This software is provided 'as-is', without any express or implied
5  * warranty. In no event will the authors be held liable for any damages
6  * arising from the use of this software.
7  *
8  * Permission is granted to anyone to use this software for any purpose,
9  * including commercial applications, and to alter it and redistribute it
10  * freely, subject to the following restrictions:
11  *
12  * 1. The origin of this software must not be misrepresented; you must not
13  * claim that you wrote the original software. If you use this software
14  * in a product, an acknowledgment in the product documentation would be
15  * appreciated but is not required.
16  * 2. Altered source versions must be plainly marked as such, and must not be
17  * misrepresented as being the original software.
18  * 3. This notice may not be removed or altered from any source distribution.
19  *
20  */
21 
22 #ifndef OE_SUBCURVE_H
23 #define OE_SUBCURVES_H
24 
25 #include "OE_curve.h"
26 #include <stdint.h>
27 #include <vector>
28 
29 class OE_subcurve : public OE_curve
30 {
31  public:
32 
34  OE_subcurve(OE_curve* curve,float curveStart,float curveEnd, bool reverse);
36  virtual ~OE_subcurve();
37 
38  bool setStart(float curveStart);
39  bool setEnd(float curveEnd);
40 
42  bool check();
43 
45  virtual void refresh();
46 
47  void delDependency(OE_base * object);
48 
49 
50  protected:
51  OE_curve* curve = nullptr;
52  float start = -1;
53  float end = -1;
54  bool reverse = false;
55 
56  private:
57 
58 };
59 
60 #endif // OE_JOINCURVE_H
Definition: OE_subcurve.h:29
bool check()
check if the curve is valid.
Definition: OE_subcurve.cpp:47
void delDependency(OE_base *object)
the function called by a reference object when he's deleted
Definition: OE_subcurve.cpp:70
virtual void refresh()
refresh the pts array.
Definition: OE_subcurve.cpp:53
OE_subcurve(OE_curve *curve, float curveStart, float curveEnd, bool reverse)
Definition: OE_subcurve.cpp:30
Definition: OE_base.h:30
Definition: OE_curve.h:30
void reverse()
reverse the curve.
Definition: OE_curve.cpp:372
virtual ~OE_subcurve()
Definition: OE_subcurve.cpp:41