X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxpoly.c;h=65a65b75346bf7c4c8daa6cd8b39476e5cf38274;hb=632abc070af6d1c9f5dd5ce2e4ea23a86c3e90a3;hp=8af47e2cb091f5e93acba79ab4c98ddf9120b79a;hpb=6ca3bfa340ad9f34a2df5e833e83cde1816e4ec5;p=swftools.git diff --git a/lib/gfxpoly.c b/lib/gfxpoly.c index 8af47e2..65a65b7 100644 --- a/lib/gfxpoly.c +++ b/lib/gfxpoly.c @@ -25,9 +25,15 @@ #include "gfxtools.h" #include "gfxpoly.h" #include "mem.h" +#ifdef INTERNAL_LIBART #include "art/libart.h" #include "art/art_svp_intersect.h" #include "art/art_svp_ops.h" +#else +#include +#include +#include +#endif #include "log.h" #include #include @@ -523,7 +529,13 @@ static double find_shear_value(ArtSVP*svp) } if(!fail) break; - v = lrand48() / 2000000000.0; +#ifdef HAVE_LRAND48 + v = lrand48() / 2000000000.0;; +#elif HAVE_RAND + v = rand() / 2000000000.0; +#else +#error "no lrand48()/rand() implementation found" +#endif tries++; } return v; @@ -723,7 +735,6 @@ void write_svp_postscript(const char*filename, ArtSVP*svp) { if(!svp) return; - printf("writing %s\n", filename); FILE*fi = fopen(filename, "wb"); int i, j; double xmin=0,ymin=0,xmax=0,ymax=0; @@ -923,11 +934,6 @@ static ArtSVP* gfxfillToSVP(gfxline_t*line, int perturb) //#endif - -extern const ArtSVP* current_svp; -extern void art_report_error(); -extern int art_error_in_intersector; - ArtSVP* run_intersector(ArtSVP*svp, ArtWindRule rule) { ArtSvpWriter * swr = art_svp_writer_rewind_new(rule);