#include "../types.h"
//#define DEBUG
-#define CHECKS
+//#define CHECKS
+
+/* features */
#define SPLAY
+#define DONT_REMEMBER_CROSSINGS
typedef enum {DIR_UP, DIR_DOWN, DIR_UNKNOWN} segment_dir_t;
typedef enum {EVENT_CROSS, EVENT_END, EVENT_START, EVENT_HORIZONTAL} eventtype_t;
typedef struct _gfxpolystroke {
segment_dir_t dir;
+ int points_size;
int num_points;
point_t*points;
fillstyle_t*fs;
} gfxpolystroke_t;
typedef struct _gfxpoly {
double gridsize;
- int num_strokes;
gfxpolystroke_t*strokes;
} gfxpoly_t;
gfxpolystroke_t*stroke;
int stroke_pos;
+#ifndef DONT_REMEMBER_CROSSINGS
dict_t scheduled_crossings;
+#endif
} segment_t;
#define LINE_EQ(p,s) ((double)(s)->delta.y*(p).x - (double)(s)->delta.x*(p).y - (s)->k)