Uses of a point element in vector graphic authoring and XSLT

Hi WWW-SVG list

I've some experience producing semi-technical drawings in Freehand, and one
technique I frequently used was to create a shape purely for the purpose of
using one of its points for aligning something else.

Example
=======
To create the positions for the numerals on a clock, one might draw and
duplicate a line (effectively a radius of an invisible circle, centred on
the visible clock face) by cloning and replicating the original 11 times,
each rotated 30° around the centre. Then 12 text boxes with centred numerals
can be dragged on to the outer point of each line, so that the centre of the
text box snaps to the point.

The lines can then be removed (I use lines instead of points for ease and
visibility).

What might be helpful in SVG is if there was a point element which could be
used in this way. I believe that there is a point object in the DOM, and you
can get and set it's coordinates.

Similarly, in generating SVG with XSLT, it might often be easier to generate
a point element which could then be referenced by further elements. I
imagine that you could build pie chart slices this way, since the elliptical
arcs go point-to-point.

I suppose you may be able to use some kind of notation like:

  <point id="sliceStart" x="60" y="10" />
  <point id="sliceEnd" x="60" y="10" transform="rotate(40)" />
  <path d="M 60,60 A sliceStart/@x,sliceStart/@y 0 0,1
sliceStart/@x,sliceStart/@y" />

Or somesuch.

Apologies if I'm missing something obvious or suggesting something heinous;
I have tried searching this list and doing a bit of reading up, but I can't
find a way in SVG to replicate this manual method I've found useful.


Tavis Reddick
Web Developer
Adam Smith College, Scotland

Received on Friday, 12 January 2007 22:42:10 UTC