case SH_POLY:
poly = (polygon_t *) ND_shape_info(n);
sides = poly->sides;
+#if 0
if (sides >= 3) { /* real polygon */
verts = N_GNEW(sides, Point);
for (i = 0; i < sides; i++) {
}
} else
verts = genRound(n, &sides, 0, 0);
+#endif
if (streq(ND_shape(n)->name, "box"))
pp->kind = BOX;
verts[3].x = PS2INCH(poly->vertices[3].x) + xmargin;
verts[3].y = PS2INCH(poly->vertices[3].y) - ymargin;
}
- else for (i = 0; i < sides; i++) {
- double h = LEN(poly->vertices[i].x,poly->vertices[i].y);
- verts[i].x = poly->vertices[i].x * (1.0 + xmargin/h);
- verts[i].y = poly->vertices[i].y * (1.0 + ymargin/h);
- verts[i].x = PS2INCH(verts[i].x);
- verts[i].y = PS2INCH(verts[i].y);
+ else {
+ for (i = 0; i < sides; i++) {
+#if 0
+ double h = LEN(poly->vertices[i].x,poly->vertices[i].y);
+ verts[i].x = poly->vertices[i].x * (1.0 + xmargin/h);
+ verts[i].y = poly->vertices[i].y * (1.0 + ymargin/h);
+ verts[i].x = PS2INCH(verts[i].x);
+ verts[i].y = PS2INCH(verts[i].y);
+fprintf(stderr, "vert=%g,%g h=%g margin=%g,%g\n",
+ verts[i].x, verts[i].y, h, xmargin, ymargin);
+#else
+ verts[i].x = PS2INCH(poly->vertices[i].x);
+ verts[i].y = PS2INCH(poly->vertices[i].y);
+#endif
+ }
}
} else
verts = genRound(n, &sides, xmargin, ymargin);