Patrick Egan wrote:
Hi James,
My understanding is the viewBox attribute defines a mapping between user space co-ordinates and the co-ordinates of the svg viewport, and in your case you are effectively scaling the image down by a factor of 10 ( 200 user units=20cm and 100 user units = 10 cm).
That's what I would expect, but it doesn't seem to be the case for me -- the document appears much smaller than I would expect.

Depending on how complex your object is you might try to use translate and scale tranforms.
<svg width="20cm" height="10cm" viewBox="0 0 20 10" style="fill:red;stroke:blue">
<g transform="translate(0,10) scale(1,-1)">
<line x1="0" y1="0" x2="20" y2="10" style="stroke: blue; stroke-width: 1" />
</g>
</svg>


Patrick

Thanks for this suggestion. I did try to use scale(1,-1) but it caused the object to disappear entirely (am I doing something really stupid here?) Also, since switching from hardcoded cms to userspace coords, I've noticed discrepancies in line widths between the SVG viewed in a JSVGCanvas and via FOP (using the PDFTranscoder). To avoid these problems, I would really like to stick with centimetres and find a simple way of reflecting objects.

Thanks
James Shaw

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to