From: John Ellson Date: Mon, 27 Aug 2012 20:30:29 +0000 (-0400) Subject: add fixme for peripheries code X-Git-Tag: LAST_LIBGRAPH~32^2~327 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23339c0bb8e612c0b16647c61bc67eea6a4b79f4;p=graphviz add fixme for peripheries code --- diff --git a/lib/common/shapes.c b/lib/common/shapes.c index f214ec3c1..bc0cc1050 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -1139,6 +1139,20 @@ static void poly_init(node_t * n) bb.y = 2. * P.y; } } else { + +/* + * FIXME - this code is wrong - it doesn't work for concave boundaries. + * (e.g. "folder" or "rarrow") + * I don't think it even needs sectorangle, or knowledge of skewed shapes. + * (Concepts that only work for convex regular (modulo skew/distort) polygons.) + * + * I think it only needs to know inside v. outside (by always drawing + * boundaries clockwise, say), and the two adjacent segments. + * + * It needs to find the point where the two lines, parallel to + * the current segments, and outside by GAP distance, intersect. + */ + vertices = N_NEW(outp * sides, pointf); sectorangle = 2. * M_PI / sides; sidelength = sin(sectorangle / 2.);