|
From: Ethan M. <merritt@u.washington.edu> - 2005-11-10 00:04:11
|
On Wednesday 09 November 2005 03:59 pm, Harald Harders wrote: > > Why do so many routines have clipping? In my opinion we have about four > things that have to be clipped, in most terminals: > > points gadgets.c:170:clip_point(unsigned int x, unsigned int y) > lines gadgets.c:192:draw_clip_line(int x1, int y1, int x2, int y2) > filled polygons We don't have this one > text term.c:941:write_multiline() > Since arrows are produced by lines and filled polygons in most terminals, > clipping would be done automatically by the routines producing the lines > and the polygons. As a positive side effect, only the part of the arrow > head would be cut off that is outside the canvas. Guess what? That is exactly the change I made to do_arrow() which you have been complaining about. It now uses the routine draw_clip_line() to draw all the lines in the arrow, which means that they get clipped automatically. What you are now finding is that this generic clipping doesn't always work the way you would like, because the individual terminal drivers are not consistent. I'm glad we are now in agreement :-) -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |