X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fgfxpoly%2Fpoly.h;h=ac1ff376ca0858eab246d11bf96d047b2a99f8d7;hb=ae9783cbbddf61f59a1d43180be3999206e5b28f;hp=b9675670e51f880e1fbe47627f480417bf6c1d96;hpb=64cbdc0d10e611af20d4d375ff6319793da8e6f5;p=swftools.git diff --git a/lib/gfxpoly/poly.h b/lib/gfxpoly/poly.h index b967567..ac1ff37 100644 --- a/lib/gfxpoly/poly.h +++ b/lib/gfxpoly/poly.h @@ -6,6 +6,7 @@ //#define DEBUG #define CHECKS +#define SPLAY typedef enum {DIR_UP, DIR_DOWN} segment_dir_t; typedef enum {EVENT_CROSS, EVENT_END, EVENT_CORNER, EVENT_START, EVENT_HORIZONTAL} eventtype_t; @@ -42,6 +43,8 @@ typedef struct _windrule fillstyle_t* (*diff)(windstate_t*left, windstate_t*right); } windrule_t; +#define SEGNR(s) ((s)?(s)->nr:-1) + typedef struct _segment { point_t a; point_t b; @@ -58,6 +61,11 @@ typedef struct _segment { windstate_t wind; int nr; +#ifdef SPLAY + struct _segment*parent; + struct _segment*leftchild; + struct _segment*rightchild; +#endif struct _segment*left; struct _segment*right; char changed;