Arian Hojat wrote:
thanx for the help. my code compiles now, but the image that shows up seems to be a default Batik image instead of the ones i use. Batik seems to find my images as no 'FileNotFoundException' gets returned but i get this broken link? vector-y image?....
The 'broken link' image is used when it can't load the referenced image. So it is very possible that it can't find the referenced image.
http://www.pages.drexel.edu/~ah49/blah.jpg when it should look like this (exported from my svg editor from the svg source that is creating the image, saved in my java program so i know batik has good code to work with):
Actually this is not a very good indicator that the DOM is good. Many errors in the DOM can be fixed by writing it out and reading it back in. In this case however I would suspect that something funky is going on with the reference to the external files. Can you provide the SVG content?
http://www.pages.drexel.edu/~ah49/source.png
my Batik code if it helps is @ http://www.pages.drexel.edu/~ah49/Main.java and the images i overlay are: http://www.pages.drexel.edu/~ah49/a.jpg http://www.pages.drexel.edu/~ah49/w.png
thanx if anyone can help me understand what is being made by batik here.
Tonny Kohar <[EMAIL PROTECTED]> wrote: Hi,
On Mon, 2005-04-04 at 02:10 -0400, Arian Hojat wrote:
[snip]
Element image1 =
svgDoc.createElementNS(SVGDOMImplementation.SVG_NAMESPACE_URI,
"image");
image1.setAttributeNS(null, "xlink:href", "a.jpg");
Change this to image1.setAttributeNS(xlinkNS,"xlink:href", "a.jpg"); Note: for this part do not use null as namespace. You could use the defined constants at org.apache.batik.util.XMLConstants.XLINK_NAMESPACE_URI or just type the whole namespace.
image1.setAttributeNS(null, "x", "0"); image1.setAttributeNS(null, "y", "0"); image1.setAttributeNS(null, "width", "100%"); image1.setAttributeNS(null, "height","100%");
Regards Tonny Kohar
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
