61
#define SK_OVERDRAW_LIMIT 5
57
#define SK_OVERDRAW_LIMIT 5
63
typedef struct SK_Overdraw
59
typedef struct SK_Overdraw {
70
65
#define SK_Stroke_BUFFER_INIT_SIZE 20
72
typedef struct SK_DrawData
67
typedef struct SK_DrawData {
75
69
int previous_mval[2];
79
typedef struct SK_Intersection
73
typedef struct SK_Intersection {
81
74
struct SK_Intersection *next, *prev;
87
float lambda; /* used for sorting intersection points */
80
float lambda; /* used for sorting intersection points */
90
typedef struct SK_Sketch
94
SK_Stroke *active_stroke;
83
typedef struct SK_Sketch {
86
SK_Stroke *active_stroke;
101
93
typedef struct SK_Gesture {
105
ListBase intersections;
106
ListBase self_intersections;
108
int nb_self_intersections;
109
int nb_intersections;
97
ListBase intersections;
98
ListBase self_intersections;
100
int nb_self_intersections;
101
int nb_intersections;
114
106
/************************************************/
116
108
void freeSketch(SK_Sketch *sketch);
117
SK_Sketch* createSketch(void);
109
SK_Sketch *createSketch(void);
119
111
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk);
121
113
void sk_freeStroke(SK_Stroke *stk);
122
SK_Stroke* sk_createStroke(void);
114
SK_Stroke *sk_createStroke(void);
124
116
SK_Point *sk_lastStrokePoint(SK_Stroke *stk);
134
126
void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end);
136
128
void sk_trimStroke(SK_Stroke *stk, int start, int end);
137
void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], float p_end[3]);
129
void sk_straightenStroke(SK_Stroke * stk, int start, int end, float p_start[3], float p_end[3]);
138
130
void sk_polygonizeStroke(SK_Stroke *stk, int start, int end);
139
131
void sk_flattenStroke(SK_Stroke *stk, int start, int end);
140
132
void sk_reverseStroke(SK_Stroke *stk);