From: Ethan M. <merritt@u.washington.edu> - 2005-11-09 23:33:51
|
On Wednesday 09 November 2005 03:04 pm, Daniel J Sebald wrote: > > I don't know if I agree on that one. Are you saying that one > can't have a fraction of an arrow at the edge of the canvas > (i.e., say the tip extends just past the canvas limit, but is > not visible)? That has to be allowed, otherwise one can't use > the many features of PostScript. If you try this with the pdf terminal, it will crash. Therefore if you want a program that doesn't crash, you have to clip off the protruding piece of the arrow before sending it to the driver. Yes, I know PostScript won't crash if you draw outside the boundaries. But don't you think we should aim for code that works (or at least doesn't crash) on all the other terminal types as well? > Maybe > a "legacy terminal" is in order... something to prevent the need > for coding up "if terminal has this feature, then this, otherwise > that" all over the place in the core code. We have that now. These are the routines do_XXX() in term.c. They provide a generic fallback for terminals that don't supply their own routine to do XXX. In the case of arrows, the generic code is called do_arrow(), and is supposed to be usable by all terminals that do not provide their own specific arrow drawing routine. That is precisely what we are now fighting with; it isn't generic enough, because it causes some terminals to segfault, or abort, or draw garbage if the arrows go outside the current canvas. If you, or Harald, feel that the generic code is not appropriate for the PostScript driver, then of course you are free to write a terminal-specific PS_arrow() routine. I'm sure you could draw nicer looking arrows that way, just as the metapost driver does, for example. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |