xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frizzell, Michael A" <michael.frizz...@eds.com>
Subject RE: Filter Problem with Java
Date Fri, 16 Aug 2002 15:08:32 GMT
You mentioned ECMA Script. To be honest that is the first time I've heard of
such a thing which may be the reason for all the confusion. I've looked at
the examples right off of the apache.org/batik and they didn't really seem
to fit what I was doing. An example out there of dynamically generating an
SVG (in memory only) in Java, (including a filter, I can do it without one)
and then creating the JPG without it ever turning the DOM into an SVG flat
file would be extremely nice to have at this point. I've looked and have yet
to find...

Btw, a new exception has arisen.

Enclosed Exception:
null:-1
An I/O error occured while processing the URI 'http://foo.bar/bar.svg#glow'
specified on the element <path>
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
testfilter.writeToJPEGFile(testfilter.java:133)
testfilter.<init>(testfilter.java:66)
testfilter.main(testfilter.java:41)

Is it a problem that the actual SVG file has no flat file sitting on some
filesystem? Do I need to create a small SVG with the filter code in it
inorder to do this? I'll keep looking into the EMCA and see where it goes.
Thanks again...
		Mike



-----Original Message-----
From: Thomas E Deweese [mailto:thomas.deweese@kodak.com]
Sent: Thursday, August 15, 2002 4:31 PM
To: Batik Users
Subject: RE: Filter Problem with Java


>>>>> "FMA" == Frizzell, Michael A <michael.frizzell@eds.com> writes:

FMA> as instructed I've added:
FMA> root.setAttributeNS(null,"xml:base","http://foo.bar/bar.svg");

I keep forgetting your doing everything in ECMA Script.  Try:

   root.setAttributeNS("http://www.w3.org/XML/1998/namespace", "base",
                       "http://foo.bar/bar.svg");

FMA>
path.setAttributeNS(null,"style","fill:none;filter:url(#glow);stroke-width:5
FMA> ;opacity:1;fill-opacity:1;stroke-opacity:1;stroke:rgb(255,255,0)");

FMA> and the exception goes away. But, at the same time while the
FMA> exception goes away, so does all the style information. 

     The problem is in trying to resolve '#glow'. Since it's a
relative URL it tries to construct the complete URL but dies because
the host documents base url is null.

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

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


Mime
View raw message