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

Public Member Functions

 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...
 
virtual bool check ()
 check if the stitch is valid.
 
virtual void refresh ()
 
- 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)
 
virtual void delDependency (OE_base *object)
 the function called by a reference object when he's deleted More...
 
 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)
 
virtual void delDependency (OE_base *object)
 the function called by a reference object when he's deleted More...
 

Static Public Attributes

static float defaultMaxlen = 0
 

Protected Attributes

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 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...
 

Constructor & Destructor Documentation

OE_stitchs::OE_stitchs ( )

Default constructor

OE_stitchs::~OE_stitchs ( )
virtual

Default destructor

Member Function Documentation

void OE_stitchs::getBound ( float *  xMin,
float *  yMin,
float *  xMax,
float *  yMax 
)
virtual

calculate the curve bounding box

Parameters
xMin,yMin,xMax,yMax-> pointers to the bouding box variables to set

Implements OE_base.

Member Data Documentation

OE_thread* OE_stitchs::thread = nullptr
protected

Tight bounding box of the shape [minx,miny,maxx,maxy].

the thread associate to this stitch


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