You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by Thomas Maier <Th...@uni-kassel.de> on 2006/05/30 13:03:27 UTC

Re: EPSDocumentGraphics2D: "Error: /rangecheck in --setmiterlimit--"

Am Montag, den 29.05.2006, 15:04 +0200 schrieb Jeremias Maerki:
> On one side, it is good to see that moving the PostScript Graphics2D
> implementation to XML Graphics Commons has already caused someone to use
> it as a stand-alone component. That was one of the goals.

So I am your first external user?  Grin :).  Great work!


> On the other side, what you're seeing is probably the effect that
> PSGraphics2D was written specifically as a backend for Batik. It seems
> that somehow the miter limit on a BasicStroke instance was set to 0.
> However, the PS language reference says that only values >=1 are valid.
> The interesting thing is that BasicStroke (Sun JVM) has a check that
> makes sure the miterlimit value does not go below 1. I wonder how this
> happened. Anyway, I've improved the code in Commons a little. Please
> verify that it's better now.
> 
> http://svn.apache.org/viewvc?rev=410093&view=rev

Thanks a lot for the quick fix and the background information, the
setmiterlimit problem is fixed, now.

FYI, I am working on an Eclipse plug in and use the
GraphicsToGraphics2DAdaptor from GMF (another Eclipse project, much
bigger than mine) that translates org.eclipse.draw2d.Graphics (from
GEF/Draw2D) calls to Graphics2D calls.  So I guess they have a custom
Stroke implementation that does not make those checks.

Thanks and regards, Thomas.


> On 27.05.2006 18:18:12 Thomas Maier wrote:
> > Hi all,
> > 
> > I have just used XMLGraphics Commons for the first time and it worked
> > almost great :).  When I try to display the EPS file, ghostscript
> > complains with
> > 
> > Error: /rangecheck in --setmiterlimit--
> > Operand stack:
> >    0
> > Execution stack:
> >    %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   --nostringval--   1   3   %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
> > Dictionary stack:
> >    --dict:1119/1686(ro)(G)--   --dict:0/20(G)--   --dict:114/200(L)--
> > Current allocation mode is local
> > Current file position is 193489
> > ESP Ghostscript 815.01: Unrecoverable error, exit code 1
> > 
> > I hardly know anything about postscript except that I probably had to
> > look for "something-that-leaves-0-on-the-stack setmiterlimit".  I looked
> > into the file and when I removed all the lines "0 setmiterlimit" (sed -i
> > -e 's/0 setmiterlimit//' /tmp/diag.eps), the file displayed.
> > 
> > Unfortunately I don't have a small example.  I used it straight in an
> > Eclipse plug in that exports images to be able to generate EPS.  So what
> > might cause those lines to appear and what can I do about them?
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org
> 
-- 
Thomas Maier <Th...@uni-kassel.de>


---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org