You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Charles H. Woloszynski" <ch...@clearmetrix.com> on 2002/08/01 02:59:36 UTC

Problem with clip-path and transcoding

I have a servlet that reads an SVG from a URL and then feeds that (via a 
TranscoderInput) into the JPEGTranscoder.

If I have define a clippath (I have it in the <defs> and then I 
references this in the body (e.g.,
   <g  clip-path="url(#plotClipArea)"  ...

then I get the following exception traceback

 Exception in: R( /clearview + /servlet + /transcode) - 
java.lang.NullPointerException
        at java.util.Hashtable.get(Hashtable.java:320)
        at java.net.URL.getURLStreamHandler(URL.java:884)
        at java.net.URL.<init>(URL.java:305)
        at java.net.URL.<init>(URL.java:224)
        at java.net.URL.<init>(URL.java:243)
        at org.apache.batik.util.ParsedURLData.buildURL(Unknown Source)
        at 
org.apache.batik.util.ParsedURLData.openStreamInternal(Unknown Source)
        at org.apache.batik.util.ParsedURLData.openStream(Unknown Source)
        at org.apache.batik.util.ParsedURL.openStream(Unknown Source)
        at 
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown 
Source)
        at org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown 
Source)
        at org.apache.batik.bridge.URIResolver.getNode(Unknown Source)
        at org.apache.batik.bridge.URIResolver.getElement(Unknown Source)
        at 
org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source)
        at org.apache.batik.bridge.CSSUtilities.convertClipPath(Unknown 
Source)
        at 
org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Unknown 
Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
        at 
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
        at 
org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
        at 
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
        at com.clearmetrix.outreach.actions.TranscoderAction


I am using JDK 1.3.1 on a Windows platform using Batik 1.5Beta3.

Any suggestions would be appreciated.  

I have attached the SVG with the clip-path that causes the exception.

Any help is appreciated.  

Thanks in advance,



Charlie



Re: Problem with clip-path and transcoding

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "CHW" == Charles H Woloszynski <ch...@clearmetrix.com> writes:

CHW> I have not had success getting the CVS version of Batik.  

     Well, I just commmited the fix to CVS, I have atteched a diff
that you may be able to apply to the 1.5b3 source release (don't know
how cleanly it will go).

CHW> I did manage to create the following test application that shows
CHW> the same behaviour.

     Thanks, this revealed a bug in the way we handled certain URLS.

CHW> Any advice on correcting this would be appreciated.


Re: Problem with clip-path and transcoding

Posted by "Charles H. Woloszynski" <ch...@clearmetrix.com>.
Thomas:

I have not had success getting the CVS version of Batik.  I did manage 
to create the following test application that
shows the same behaviour.  

Any advice on correcting this would be appreciated.

Thanks in advance,

Charlie

P.S.  I have put the test SVG file on our public server, so the URL 
should work as coded in the attachement.



Thomas E Deweese wrote:

>>>>>>"CHW" == Charles H Woloszynski <ch...@clearmetrix.com> writes:
>>>>>>
>
>CHW> I have a servlet that reads an SVG from a URL and then feeds that
>CHW> (via a TranscoderInput) into the JPEGTranscoder.
>
>CHW> If I have define a clippath (I have it in the <defs> and then I
>CHW> references this in the body (e.g., <g
>CHW> clip-path="url(#plotClipArea)" ...
>
>CHW> then I get the following exception traceback
>
>     I would suggest trying CVS Batik (I believe I fixed a bug in this
>area since 1.5B3).  If this doesn't solve the problem can you
>construct a standalone Java file that reproduces this bug?
>
>     Using the Transcoder I can't reproduce it.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: batik-users-help@xml.apache.org
>


Problem with clip-path and transcoding

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "CHW" == Charles H Woloszynski <ch...@clearmetrix.com> writes:

CHW> I have a servlet that reads an SVG from a URL and then feeds that
CHW> (via a TranscoderInput) into the JPEGTranscoder.

CHW> If I have define a clippath (I have it in the <defs> and then I
CHW> references this in the body (e.g., <g
CHW> clip-path="url(#plotClipArea)" ...

CHW> then I get the following exception traceback

     I would suggest trying CVS Batik (I believe I fixed a bug in this
area since 1.5B3).  If this doesn't solve the problem can you
construct a standalone Java file that reproduces this bug?

     Using the Transcoder I can't reproduce it.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org