|
From: Ethan M. <merritt@u.washington.edu> - 2005-07-20 16:38:58
|
On Wednesday 20 July 2005 01:13 am, Petr Mikulik wrote:
> > new options. In recent posts you have expressed great
> > concern about code bloat and the resulting size of the gnuplot
> > binary. Since every new terminal API call introduces a function
> > pointer slot into ~50 driver entry tables, I would have thought you
> > to oppose proliferation of new terminal API functions. And to
>
> I would also prefer to reduce the terminal API bloat by having more generic
> APIs.
Oh dear. I do not see a consensus emerging ;-(
> Example: I want to add one more to avoid codes like 'if (term->name=="pm")
That's a bad example, because it only occurs in code segments that are
already conditional on OS2. Making it a terminal entry test instead would
not actually simplify the call sites. I.e. it would still have to be
#ifdef OS2
... other OS2-specific code ...
if (term->whatever)
(term->whatever)(foo);
#endif
> >
> > /* Used by post.trm to optimize the color box (called from color.c)
> > * Could be generalized to draw arbitrary rectangles with gradient
> > * fill.
> > */
> > term->gradient_fill(int xl, int xh, int yl, int yh, struct gradient *g)
>
> I don't think that's necessary. Only those few pieces needing this can use
> "if (terminal is postscript) ..." as it is now.
Wait. Isn't that exactly the opposite of what you were arguing above
with respect to "if (terminal is pm)" ?
Anyhow, if you think it is useful to optimize a gradient-filled
rectangle, why limit it to postscript? libgd and (I think) svg also
could support this.
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|