On 12 Apr 2000, Lars Clausen wrote:
> That's how it was, until today. I also implemented a proper interior-point
> detection algorithm (both, in fact, though I haven't tested the winding
> version). Check an update.
>
Are you sure you have commited this? This is the change I made to
polyshape.c:
--- lib/polyshape.c 2000/04/11 23:45:37 1.4
+++ lib/polyshape.c 2000/04/13 00:55:46 1.5
@@ -137,18 +137,8 @@
real
polyshape_distance_from(PolyShape *poly, Point *point, real line_width)
{
- int i;
- real dist;
-
- /* FIXME: Need winding rule or something */
- dist = distance_line_point( &poly->points[0], &poly->points[1],
- line_width, point);
- for (i=1;i<poly->numpoints-1;i++) {
- dist = MIN(dist,
- distance_line_point( &poly->points[i], &poly->points[i+1],
- line_width, point));
- }
- return dist;
+ return distance_polygon_point(poly->points, poly->numpoints,
+ line_width, point);
}
static void
[snip]
>
> Very nice! That means once the polygon is ready (still have problems with
> the connectionpoints), it'll be trivial to do the beziergon.
>
> One thing about bezier{line,gon}: The two control lines around a point are
> currently joined together. Is anybody interested in having the ability to
> break them apart so they can move independently? (Or did I ask this
> already?) It's almost, but not quite, trivial.
>
That is probably a good idea. There are three ways to handle the control
lines - cusp (the two control points are independent), smooth (two control
points are on the same line) and symmetric (the current behaviour). It
would probably be nice to allow the user to change the behaviour for each
point on a bezierconn.
To keep compatibility, symmetric would have to be the default.
> -Lars
>
James.