From: Ethan M. <merritt@u.washington.edu> - 2006-05-08 20:31:13
|
On Monday 08 May 2006 01:19 pm, you wrote: > Ethan Merritt wrote: > > The gppsfile is the PostScript output stream itself. > > If the current terminal driver is "post", this is only output > > stream (gppsfile == gpoutfile). But for epslatex, pslatex, etc, > > it is a secondary output stream parallel to the TeX output. > > Well, that's true. But ultimately, I think the purpose here is more one of being a flag No. It *must* have a separate output file descriptor, because if you were to send it to gpoutfile it would get intermingled with the TeX output stream. > , i.e., > /* for pm3dCompress.awk */ > if (gppsfile) > fputs("%pm3d_map_begin\n", gppsfile); Yeah, but that is just an added nicety. The gppsfile mechanism is necessary in any case. Getting back to the case at hand, the reason post.trm has a private routine for this is that we encode the color palette mapping equations into PostScript and include it in the output file. So the requisite colors can be generated at print time, taking into consideration the capabilities of the printer, without the core routines having to know anything about the eventual printer properties. > > Easy. Some output devices have special requirements, or > > special capabilities. So the corresponding terminal driver > > needs a private routine to implement these requirements > > or features. But it would be silly to write a private > > routine for every single driver, because most of them can > > share a generic default routine. > > > > For instance, some of the TeX variants support a "draw arrow" > > command as a native operation, and can produce snazzier arrows > > than gnuplot's generic do_arrow() routine. > > Let's see if I can fit the image stuff into this context. I'm not sure it makes any sense to have a generic fallback for the image code. You *could* write a generic routine that draws each pixel as a single dot, turning an HP2648 pen-plotter into a latter day pointiliste successor to Seurat. But I don't think we need to go there :-) -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |