openEmbroider  0.1
an open source embroidery software
OE_linkstitch.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_LINKSTITCH_H
23 #define OE_LINKSTITCH_H
24 
25 #include "OE_stitchs.h"
26 
27 class OE_linkstitch : public OE_stitchs
28 {
29  public:
30  //OE_linkstitch();
31  OE_linkstitch(OE_stitchs* stitchStart, OE_stitchs* stitchEnd);
32  ~OE_linkstitch();
33 
34  virtual bool check();
35 
36  virtual void refresh();
37 
38  void setStitchStart( OE_stitchs* stitch);
39  void setStitchEnd( OE_stitchs* stitch);
40 
41  void setStepPts( std::vector<vector_2d> pts);
42 
43  std::vector<vector_2d> stepPts;
44 
45  void delDependency(OE_base * object);
46 
47  static float defaultLinkMaxlen;
48 
49  protected:
50  OE_stitchs* stitchStart = nullptr;
51  OE_stitchs* stitchEnd = nullptr;
52 };
53 
54 #endif // OE_LINESTITCH_H
virtual bool check()
check if the stitch is valid.
Definition: OE_linkstitch.cpp:70
Definition: OE_base.h:30
Definition: OE_stitchs.h:31
Definition: OE_linkstitch.h:27
std::vector< vector_2d > pts
the array of stitch points
Definition: OE_stitchs.h:93
void delDependency(OE_base *object)
the function called by a reference object when he's deleted
Definition: OE_linkstitch.cpp:105