Corner handling (was Re: Rounded corners)



Ok, I think the problem here is that I sidetracked myself into thinking
primarily about rounded corners, when I was most interested in
consistent and, preferably, intuitive handling of corners among the
various object types.  What I've learned is that the various renderers
have the concept of a line join _built in_, and that the available ones
are mitre, bevel, and round, present in both the Cairo renderers and in
the Gdk renderers.

I think that using these will address my concerns; here's the framework
I suggest (elaborated from a previous version):

1. Add pulldown "join type" parameter to box, polygon, polyline,
zigzagline, and possibly bezierline and beziergon (for when they have
cusp rendering).  This menu would have values mitre (default), bevel,
and round.

2. Remove "corner radius" parameter from polyline, zigzagline, since its
use is basically subsumed by rounded joins.

3. Leave "corner radius" in box, where it triggers a rounded rectangle
to be drawn instead of a regular rectangle; "join type" is still present
but is ignored.

Within that framework, two bugs can be fixed:

#535871, to do with rounded corners on polyline and zigzagline,
automatically goes away since it arises from manually fiddling with
arcs.

#534275, to do with (lack of) joins on lines and consistency between
objects, is likewise fixed.  (Part of this may have already been fixed
in the SVN trunk even before my report; I don't see a recent change that
would have fixed it.  Curiously, if I save a file using the SVN version
and open it with 0.96.1, the boxes *do* have mitred joins, but then if I
double click them and immediately click "apply" they go away!)


I've done some proof-of-concept hacking and it looks like the Gdk and
Cairo renderers both handle MITER and ROUND beautifully.  I've got other
stuff tomorrow, but if the above thoughts seem reasonable I'll try to
put together a patch on Sunday.

-- 
-=-Don Blaheta-=-=-blahedo blahedo org-=-=-=-<http://www.blahedo.org/>-=-
Ask five economists and you'll get five different explanations (six if
one went to Harvard).                           --Edgar R. Fiedler



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]