xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arian Hojat <armyofda12mnk...@gmail.com>
Subject Re: SVG Xlink:href element within a Document.... <image> tags doesnt seem to render in Batik?
Date Tue, 05 Apr 2005 22:07:11 GMT
Hey Tonny and all,

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?....
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):
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 <tonny@kiyut.com> 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
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com


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

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


Mime
View raw message