Connectors

There was some discussion about SVG connectors on the call today, and about
how they would work both graphically and semantically.

I thought a good place to start would be an existing implementation.
Attached is an OpenOffice drawing file consisting of an ellipse with two
connectors leading out of it.  One leads to a rectangle and the other leads
to a star.  I've also attached the extracted XML content for the same
file.  I added some description and title elements for each using the
OpenOffice interface.

The connector structure is as follows:

<draw:connector draw:style-name="gr1" draw:layer="layout"
draw:text-style-name="P1" svg:d="M11200 8800c0 7650-6050 3850-6050 7600"
draw:end-shape="id2" draw:start-glue-point="2" draw:start-shape="id1"
svg:y2="16.4cm" svg:x2="5.15cm" svg:y1="8.8cm" svg:x1="11.2cm"
draw:line-skew="1.3cm" draw:type="curve">

<svg:title>Route 1</svg:title>


<svg:desc>Connects the start to Option 1. It is shown as a curved line,
which might mean something.</svg:desc>


<text:p/>


</draw:connector>

As you can see, they throw in some extra SVG attributes for easy conversion
to a path or line, as well as using the SVG namespace directly for title
and desc elements.  The actual drawing styles are controlled by values in
their own namespace -- this is a curved connector, with the mid-line
shifted (skewed) towards the ending shape.  It is "glued" to a specific
numbered point on the starting shape, but will jump between points on the
ending shape in order to create the neatest connection line.

Semantically, the unique attributes of the connector are the `start-shape`
and `end-shape` references to other shapes' id values.  I'd be interested
to know how OpenOffice communicates this information to the different
accessibility APIs, if any of you want to play around with the .odg file.
You should also be able to open it in the latest MS Office, which has
equivalent drawing elements.

~Amelia BR

Received on Friday, 1 May 2015 14:28:05 UTC