openEmbroider  0.1
an open source embroidery software
OE_linestitch Class Reference
Inheritance diagram for OE_linestitch:
OE_stitchs OE_base

Public Member Functions

 OE_linestitch (OE_thread *thread, OE_curve *curve, float len, float width)
 
 OE_linestitch (OE_thread *thread, OE_curve *curve, float len, float width, unsigned motif, float offset)
 
virtual bool check ()
 check if the stitch is valid.
 
virtual void refresh ()
 
void setCurve (OE_curve *curve)
 
void setLen (float len)
 
void setWidth (float width)
 
void setMotif (unsigned stitch)
 
void setOffset (float offset)
 
void setReverse (bool reverse)
 
void delDependency (OE_base *object)
 the function called by a reference object when he's deleted More...
 
- Public Member Functions inherited from OE_stitchs
 OE_stitchs ()
 
virtual ~OE_stitchs ()
 
bool getPoint (uint16_t nb, float *x, float *y)
 to get a point in the stitch.
 
bool getPoint (uint16_t nb, vector_2d *pt)
 
std::vector< vector_2dgetPoints ()
 return a copy of the array of points
 
int getNpts ()
 return the number of points in the stitch (control points, without handles)
 
OE_threadgetThread ()
 to get the thread.
 
bool setPoint (uint16_t nb, float x, float y)
 to set a point in the stitch.
 
bool setThread (OE_thread *thread)
 to set the thread.
 
bool addPoint (float x, float y)
 to add a point at the end of the stitch.
 
bool addPoint (vector_2d pt)
 
bool setMaxLen (float maxLen)
 set the max len of a segment
 
std::vector< vector_2dstitchMaxLen (std::vector< vector_2d > ptsArray, float maxlen)
 return an array of point splited to respect the maxLen distance
 
virtual void getBound (float *xMin, float *yMin, float *xMax, float *yMax)
 calculate the curve bounding box More...
 
- Public Member Functions inherited from OE_base
 OE_base ()
 
virtual ~OE_base ()
 
bool getNeedRefresh ()
 
void setNeedRefresh ()
 
void addDependency (OE_base *object)
 add and remove dependency from the list More...
 
void removeDependency (OE_base *object)
 
 OE_base ()
 
virtual ~OE_base ()
 
bool getNeedRefresh ()
 
void setNeedRefresh ()
 
void addDependency (OE_base *object)
 add and remove dependency from the list More...
 
void removeDependency (OE_base *object)
 

Static Public Member Functions

static bool initMotifs ()
 

Protected Attributes

OE_curvecurve = nullptr
 
bool reverse = false
 
float len =1
 
float width =1
 
unsigned stitchType = 0
 
float offset = 0
 
- Protected Attributes inherited from OE_stitchs
OE_threadthread = nullptr
 Tight bounding box of the shape [minx,miny,maxx,maxy]. More...
 
std::vector< vector_2dpts
 the array of stitch points
 
float maxLen = 0
 
- Protected Attributes inherited from OE_base
std::list< OE_base * > objects
 
float bounds [4]
 Tight bounding box of the object [minx,miny,maxx,maxy].
 
bool needRefresh = true
 flag to know who must be refreeshed
 

Additional Inherited Members

- Static Public Attributes inherited from OE_stitchs
static float defaultMaxlen = 0
 
- Static Protected Member Functions inherited from OE_base
static bool ptInBounds (vector_2d pt, float *bounds)
 check if a point is in a given bounding box More...
 
static bool ptInBounds (vector_2d pt, float *bounds)
 check if a point is in a given bounding box More...
 

Member Function Documentation

void OE_linestitch::delDependency ( OE_base object)
virtual

the function called by a reference object when he's deleted

Parameters
object-> the reference object

Reimplemented from OE_base.


The documentation for this class was generated from the following files: