W3C home > Mailing lists > Public > www-svg@w3.org > July 2003

how can i reuse coordinate points?

From: Korin Yang <korin.yang@webmethods.com>
Date: Fri, 18 Jul 2003 13:42:44 -0400
Message-ID: <6F87C61ED489C345BC2B71741C41EE5B0190D9BC@mailwest>
To: www-svg@w3.org

Hi -

I would like to define an image that is drawn at a particular point, and
then use that image from a separate file and also annotate it with another
image.  Is there a way for me to define the coordinates in the initial file,
so that I can use them to draw the annotation in the second file?

E.g.

definition file has:
<defs>
	<image id="base-image" x="100" y="100" width="50" height="50"
xlink:href="baseimage.gif"/>
</defs>

generated file has:
<use xlink:href="defs.svg#base-image"/>
<image x="90" y="100" width="16" height="16" xlink:href="annotation.gif"/>

What I would like is something that would have the effect of:
definition file:
<defs>
	<translate id="base-coords" x="100" y="100"/>
	<image id="base-image" transform="url(#base-coords)" width="50"
height="50" xlink:href="baseimage.gif"/>
</defs>

generated file:
<use xlink:href="defs.svg#base-image"/>
<image transform="url(defs.svg#base-coords) translate(-10)" width="16"
height="16" xlink:href="annotation.gif"/>

The main difficulty I'm having is defining the coordinate points without
requiring the object that's using them to be inside the set of tags that
defines the points.

Thanks!
  -Korin
Received on Friday, 18 July 2003 14:44:54 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:25 GMT