On Sep 16, 2008, at 22:44, lmhelp wrote:
Hi
Thank you for you answer Jeremias.
Doing what you suggest I get something very small
and which definitely doesn't fit into the 4cmx4cm square as expected.
You may be right about omitting "cm"...
Any other idea?
Hmm, I was completely unaware of any issues with scaling of instream-
foreign-objects.
Having run some tests here, how about something like:
<fo:instream-foreign-object
height="4cm" width="4cm"
content-height="scale-to-fit" content-width="scale-to-fit"
scaling="uniform">
<svg:svg width="60" height="60">
<svg:g stroke="#FF0000">
<svg:line x1="0" y1="0" x2="40" y2="40" />
<svg:line x1="10" y1="10" x2="50" y2="50" />
<svg:line x1="20" y1="20" x2="60" y2="60" />
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
This seems to work nicely, although, it took me a while to figure out
the intended effect...
Changing the stroke-color for each of the three lines does show that
scaling works like a charm here.
With the above, the instrinsic width/height of the SVG will be
computed as:
60 pixels * 1/72 dots-per-inch = 0.8333in = 21.167mm
The image will be scaled up to fit the viewport-area of the instream-
foreign-object, and you will get a rather thick line (large pixels).
Setting the width and height to 600 pixels OTOH (and, of course,
multiplying the x- and y-coordinates for the lines) produces a much
thinner line in the output. All depends on what quality/precision you
need. Seen that we're dealing with vector graphics, the difference is
literally limited to the extra zeroes in the input... :-)
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]