openEmbroider  0.1
an open source embroidery software
OE_birailstitch.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_BIRAILSTITCH_H
23 #define OE_BIRAILSTITCH_H
24 
25 #include "curves/OE_curve.h"
26 #include "stitchs/OE_stitchs.h"
27 
29 {
30  public:
31  //OE_birailstitch();
32  OE_birailstitch(OE_thread* thread,OE_curve* curve1,OE_curve* curve2, float len);
33  OE_birailstitch(OE_thread* thread,OE_curve* curve1, OE_curve* curve2, bool reverse1, bool reverse2, float offset1, float offset2, float len);
34  ~OE_birailstitch();
35 
36  virtual bool check();
37 
38  virtual void refresh();
39 
40 
41  void setCurve1( OE_curve* curve);
42  void setReverse1(bool reverse);
43  void setOffset1(float offset);
44  void setCurve2( OE_curve* curve);
45  void setReverse2(bool reverse);
46  void setOffset2(float offset);
47  void setLen(float len);
48 
49  static float defaultLen;
50 
51  void delDependency(OE_base * object);
52 
53  protected:
54  OE_curve* curve1 = nullptr;
55  OE_curve* curve2 = nullptr;
56  bool reverse1 = false;
57  float offset1 = 0;
58  bool reverse2 = false;
59  float offset2 = 0;
60  float len = 0;
61 
62 
63 };
64 
65 #endif // OE_BIRAILSTITCH_H
Definition: OE_thread.h:26
virtual bool check()
check if the stitch is valid.
Definition: OE_birailstitch.cpp:93
OE_thread * thread
Tight bounding box of the shape [minx,miny,maxx,maxy].
Definition: OE_stitchs.h:90
Definition: OE_base.h:30
void delDependency(OE_base *object)
the function called by a reference object when he's deleted
Definition: OE_birailstitch.cpp:149
Definition: OE_stitchs.h:31
Definition: OE_curve.h:30
Definition: OE_birailstitch.h:28