#include <math.h>
#include "../mem.h"
#include "../types.h"
-#include "../q.h"
#include "../MD5.h"
#include "poly.h"
#include "active.h"
p->y = 0;
free(p);
}
-static type_t point_type = {
+type_t point_type = {
equals: point_equals,
hash: point_hash,
dup: point_dup,
char gfxpoly_check(gfxpoly_t*poly)
{
+ current_polygon = poly;
dict_t*d = dict_new2(&point_type);
int s,t;
gfxpolystroke_t*stroke = poly->strokes;
s->nr = segment_count++;
#ifdef CHECKS
+ /* notice: on some systems (with some compilers), for the line
+ (1073741823,-1073741824)->(1073741823,1073741823)
+ we get LINE_EQ(s->a, s) == 1.
+ That's why we now clamp to 26 bit.
+ */
assert(LINE_EQ(s->a, s) == 0);
assert(LINE_EQ(s->b, s) == 0);