|
From: Petr M. <mi...@ph...> - 2006-05-08 20:07:44
|
> My opinion is that this "gppsfile" variable should be eliminated. From what
> I understand, the purpose of this is a flag in the main code that indicates a
> PostScript comment can be added to the file for later use. This is for the
> purpose of later running an awk script to look for repeated postscript
> strings and redefine them as shorter strings for purposes of compression.
No; the term_api.h says:
/* Output file where the PostScript output goes to.
In particular:
gppsfile == gpoutfile
for 'set term': postscript, pstex
gppsfile == PSLATEX_auxfile
for 'set term': pslatex
gppsfile == 0
for all other terminals
It is non-zero for for the family of postscript terminals, thus making
this a unique check for postscript output (pm3d has some code optimized
for PS, for instance).
*/
> The goal is laudable, but oh how convoluted this is. Not clean code. Why
> not just write the PostScript version of these "draw one" routines with short
> definitions in the first place? Plus, why would this have to be done at the
> core code level? Also, why couldn't someone just gzip the file in question
> after the fact?
The code is clean and optimized for the postscript language. Current
colorbox drawing takes 7 lines for any number of maxcolors, while otherwise
it would be `maxcolors`lines.
> That will pretty much accomplish this "substitute long string with short
> string" approach.
This is a completely different topic (code produced by PS_filled_polygon).
> * somewhere in the pm3d code would be this test to check if the pm3d drawing
> constitutes a flat 2D surface.
>
> * if flat surface, call the "image" terminal routine having a new projection
> angle input
>
> * For those terminals not supporting projected images, they can callback the
> routine that draws projected images with individual rhombus-es (or rhombi?)
Thus you mean to automagically change "with pm3d" into "with image" without
knowing it to user? That's not a good idea I think.
---
PM
|