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).


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

James Shaw wrote:

I have been looking for a way to reflect an object about its y axis; I understand that I need a transform matrix to do this, and that you cannot translate by cms, ins or other units. The ppl on #svg recommended using a viewbox.

I've checked on #svg, and I understand that a document like this:

<svg width="20cm" height="10cm" viewBox="0 0 200 100">
<line x1="0" y1="0" x2="20" y2="10" style="stroke: blue; stroke-width: 1"/>
</svg>


should produce a drawing 20x10cms. However, when I preview this in squiggle or a JSVGScrollPane, the drawing is about 80x40 pixels. I would have expected batik to use the screen dpi (or similar measurement) to correct render the document at 100% zoom.

Am I using viewBox incorrectly, or am I using Batik wrongly?

Thanks in advance
James Shaw

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




Important - This e-mail and the information that it contains may be
confidential, legally privileged and protected by law.  Access by the
intended recipient only is authorised.  Any liability (in negligence or
otherwise) arising from any third party acting, or refraining from acting,
on any information contained in this e-mail is hereby excluded.  If you are
not the intended recipient, please notify the sender immediately and do not
disclose the contents to any other person, use it for any purpose, or store
or copy the information in any medium.  Copyright in this e-mail and
attachments created by us belongs to the author and
also asserts the right to be identified as such and object to any misuse.

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



Reply via email to