|
From: sfeam (E. Merritt) <eam...@gm...> - 2010-03-30 05:16:16
|
On Monday 29 March 2010, Mojca Miklavec wrote:
> PS: if it's only about the round-off error - why not putting some
> "lineto" statements every now and then instead of rlineto? I guess
> rlineto result in smaller files, but one doesn't need to "stroke" the
> line in the middle of curve.
That would work to overcome the current problem. But according to
the comments in post.trm this runs into a separate problem:
/* Ghostscript has a "pile-up of rounding errors" bug: a sequence of many
* rmove's or rlineto's does not yield the same line as move's or lineto's.
* Therefore, we periodically force an update of the absolute position.
* There was a case when 400 rlineto's were too much, so let's go a little
* bit higher than the default function sampling rate in gnuplot.
* This runs into a second ghostscript bug, that mixing relative and absolute
* lineto with no intervening 'stroke' is ridiculously slow to render.
* So we stroke the partial line, update the position in absolute terms,
* then continue. This whole section can go away if ghostscript/gv is fixed.
*/
# define MAX_REL_PATHLEN 105
if (ps_path_count >= MAX_REL_PATHLEN) {
fprintf(gppsfile, "stroke %d %d M\n", x, y);
ps_path_count = 1;
}
I suppose we could make MAX_REL_PATHLEN configurable, and skip the section if
it is set to zero.
So, has ghostscript/gv been fixed during the intervening years?
I don't know.
|