Index: test.c =================================================================== --- test.c (revision 8176) +++ test.c (revision 8177) @@ -25,7 +25,7 @@ { pcb_vnode_t *v, *n; pcb_vnode_t *pl = &c->head; - pcb_coord_t minx = COORD_MAX, miny = COORD_MAX, maxx = -COORD_MAX, maxy = -COORD_MAX; + pcb_coord_t minx = COORD_MAX, miny = COORD_MAX, maxx = -COORD_MAX, maxy = -COORD_MAX, w, h; #define update_minmax(min, max, val) \ if (val < min) min = val; \ @@ -41,7 +41,10 @@ update_minmax(miny, maxy, n->point[1]); } while ((v = v->next) != pl); - printf("viewport %ld %ld - %ld %ld\n", (long)minx, (long)miny, (long)maxx, (long)maxy); + w = maxx - minx; + h = maxy - miny; + printf("ident\nscale 1 -1\n"); + printf("viewport %f %f - %f %f\n", (minx - w/20.0), (miny - h/20.0), (maxx + w/20.0), (maxy + h/20.0)); printf("frame\n"); } v = pl; @@ -65,7 +68,7 @@ for (c = p->contours->next; c != NULL; c = c->next) { printf("!hole:\n"); - printf("dash 0x3333\n"); + printf("dash 0x3333\n"); draw_(c, 0); } printf("flush\n");