minor fixes
authorMatthias Kramm <kramm@quiss.org>
Fri, 2 Apr 2010 03:01:51 +0000 (20:01 -0700)
committerMatthias Kramm <kramm@quiss.org>
Fri, 2 Apr 2010 03:01:51 +0000 (20:01 -0700)
lib/gfxpoly/Makefile
lib/gfxpoly/poly.c
lib/gfxpoly/poly.h

index d91c78f..bbfa391 100644 (file)
@@ -40,7 +40,7 @@ GFX=../gfxfont.o ../gfxtools.o ../gfximage.o  ../devices/ops.o ../devices/polyop
 stroke: test_stroke.c $(OBJS) ../libgfxswf.a ../librfxswf.a ../libbase.a 
        $(CC) test_stroke.c $(OBJS) ../libgfxswf.a ../librfxswf.a $(GFX) ../libbase.a -o stroke $(LIBS)
 
-SWF = ../librfxswf.a ../libpdf.a -lstdc++
+SWF = ../librfxswf.a ../libgfxpdf.a -lstdc++
 test: ../libbase.a test.c $(OBJS) poly.h convert.h $(GFX) 
        $(CC) test.c $(OBJS) $(SWF) $(GFX) ../libbase.a -o test $(LIBS)
 
index 36304ae..d02ce5e 100644 (file)
@@ -194,9 +194,9 @@ char gfxpoly_check(gfxpoly_t*poly)
     DICT_ITERATE_ITEMS(d, point_t*, p, void*, c) {
         int count = (ptroff_t)c;
         if(count&1) {
-            fprintf(stderr, "Point (%f,%f) occurs %d times\n", p->x*poly->gridsize, p->y*poly->gridsize, count);
+            fprintf(stderr, "Point (%d,%d) occurs %d times\n", p->x, p->y, count);
             dict_destroy(d);
-            return 0;
+           assert(count%2 == 0);
         }
     }
     dict_destroy(d);
@@ -1376,8 +1376,8 @@ gfxpoly_t* gfxpoly_process(gfxpoly_t*poly1, gfxpoly_t*poly2, windrule_t*windrule
     }
 #endif
 
-    //add_horizontals(p, &windrule_evenodd, context); // output is always even/odd
-    add_horizontals(p, windrule, context);
+    add_horizontals(p, &windrule_evenodd, context); // output is always even/odd
+    //add_horizontals(p, windrule, context);
     return p;
 }
 
index 625d632..bd1c992 100644 (file)
@@ -6,7 +6,7 @@
 #include "../types.h"
 #include "wind.h"
 
-//#define DEBUG
+#define DEBUG
 #define CHECKS
 
 /* features */