Return-Path: Delivered-To: apmail-xmlgraphics-general-archive@www.apache.org Received: (qmail 51656 invoked from network); 30 May 2006 11:04:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 May 2006 11:04:10 -0000 Received: (qmail 49428 invoked by uid 500); 30 May 2006 11:04:09 -0000 Mailing-List: contact general-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@xmlgraphics.apache.org Delivered-To: mailing list general@xmlgraphics.apache.org Received: (qmail 49417 invoked by uid 99); 30 May 2006 11:04:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 04:04:09 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [141.51.12.230] (HELO hrz-ws39.hrz.uni-kassel.de) (141.51.12.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2006 04:04:08 -0700 Received: from [192.168.123.105] (se-ma-pc61.se.eecs.uni-kassel.de [141.51.123.61]) by hrz-ws39.hrz.uni-kassel.de (8.13.6/8.13.6) with ESMTP id k4UB3ctF018061; Tue, 30 May 2006 13:03:38 +0200 Subject: Re: EPSDocumentGraphics2D: "Error: /rangecheck in --setmiterlimit--" From: Thomas Maier To: general@xmlgraphics.apache.org In-Reply-To: <20060529144418.A9B1.DEV@jeremias-maerki.ch> References: <1148746693.20320.27.camel@marvin.se.eecs.uni-kassel.de> <20060529144418.A9B1.DEV@jeremias-maerki.ch> Content-Type: text/plain Date: Tue, 30 May 2006 13:03:27 +0200 Message-Id: <1148987007.25702.40.camel@marvin.se.eecs.uni-kassel.de> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-UNIK-SMTP-MailScanner: Found to be clean X-UNIK-SMTP-MailScanner-From: thomas.maier@uni-kassel.de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 --------------------------------------------------------------------- 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