You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Reinhard Brandstädter <r....@gmx.at> on 2003/06/12 20:14:20 UTC
translocating elements...
Is there an easy way to translocate elements in a document/canvas.
I have a SVGDoc rendered in a JSVGCanvas and now I want to display
another document at several different positions within the other document.
It's easy for simple shapes like rectangles (just change the "x" and "y"
attributes but it gets more complex for polygons or combined objects.
For polygons I would have to change all single point accordingly to
position the whole object correctly, since all values are absolute
coordinates.
--
Reinhard Brandstaedter r.brandstaedter@gmx.at GPG: 0x033B81DB
- Student of Computer Science - J.K. University of Linz -
- <ICQ: 73059068> <Mobile: +43 699 12419541> -
- http://adelaide.dnsalias.net -
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
RE: translocating elements...
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "RB" == Reinhard Brandstädter <r....@gmx.at> writes:
RB> Is there an easy way to translocate elements in a document/canvas.
RB> I have a SVGDoc rendered in a JSVGCanvas and now I want to display
RB> another document at several different positions within the other
RB> document. It's easy for simple shapes like rectangles (just
RB> change the "x" and "y" attributes but it gets more complex for
RB> polygons or combined objects. For polygons I would have to change
RB> all single point accordingly to position the whole object
RB> correctly, since all values are absolute coordinates.
They are 'absolute' in the local user coordinate system.
Try reading Chaper 7 of the SVG specification. In particular
the stuff about the 'transform' attribute:
<g transform="translate(10, 10)">
<!-- Everything is now shited 10 user space units in x & y. -->
....
</g>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org