blob: 595363b73c44bc009bf9223ad553fcbbd69c667b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*! @file emb-stitch.h */
#ifndef EMB_STITCH_H
#define EMB_STITCH_H
#include "api-start.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Machine codes for stitch flags */
#define NORMAL 0 /* stitch to (xx, yy) */
#define JUMP 1 /* move to(xx, yy) */
#define TRIM 2 /* trim + move to(xx, yy) */
#define STOP 4 /* pause machine for thread change */
#define SEQUIN 8 /* sequin */
#define END 16 /* end of program */
typedef struct EmbStitch_
{
int flags; /* uses codes defined above */
double xx; /* absolute position (not relative) */
double yy; /* positive is up, units are in mm */
int color; /* color number for this stitch */ /* TODO: this should be called colorIndex since it is not an EmbColor */
} EmbStitch;
typedef struct EmbStitchList_
{
struct EmbStitch_ stitch;
struct EmbStitchList_* next;
} EmbStitchList;
extern EMB_PUBLIC EmbStitchList* EMB_CALL embStitchList_create(EmbStitch data);
extern EMB_PUBLIC EmbStitchList* EMB_CALL embStitchList_add(EmbStitchList* pointer, EmbStitch data);
extern EMB_PUBLIC int EMB_CALL embStitchList_count(EmbStitchList* pointer);
extern EMB_PUBLIC int EMB_CALL embStitchList_empty(EmbStitchList* pointer);
extern EMB_PUBLIC void EMB_CALL embStitchList_free(EmbStitchList* pointer);
extern EMB_PUBLIC EmbStitch EMB_CALL embStitchList_getAt(EmbStitchList* pointer, int num);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#include "api-stop.h"
#endif /* EMB_STITCH_H */
/* kate: bom off; indent-mode cstyle; indent-width 4; replace-trailing-space-save on; */
|