Having negative dimensions for a viewbox is perfectly normal in SVG. It
allows the origin (point 0,0) to be somewhere in the middle of the
image. I have some features which were plotted with negative
coordinates.
The width and height ideally matches what's in viewbox (it doesn't
here).
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
1T3XT info
Sent: Thursday, March 20, 2008 11:59 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] FW: image in a cell
Eric Hamacher wrote:
> I've had some success. I have an really increase the horizontal
> dimension of my view box for the SVG image. This doesn't make sense
to
> me. I thought the view box only defined the area of the SVG palate
that
> is visible. It should have only to do with the image itself and not
its
> size and position in a table cell. I guess iText puts more meaning in
> it. Or maybe I just don't understand it. Probably the latter!
I see a lot of stuff I don't understand:
> Attr viewBoxAttr = doc.createAttribute("viewBox");
>
> viewBoxAttr.setNodeValue("-750 -850 1500 1700");
> widthAttr.setNodeValue("2000");
>
> heightAttr.setNodeValue("2000");
>
> svg.setAttributeNodeNS(widthAttr);
>
> svg.setAttributeNodeNS(heightAttr);
I think you are right when you suspect the problem lies somewhere
in the interpretation of the width and height. For instance: you
have negative values in the view box, couldn't that be causing
the fact that you only see half the image?
--
This answer is provided by 1T3XT BVBA
------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/