Path Attribute

The @Path attribute contains specially formatted text that describes a set of points and line connections between them that define the shape’s outline. The path defined must be closed. A path is begun by specifying m and a coordinate. This indicates a moveto the given coordinate. Line segments are drawn using l (lineto) and specifying subsequent coordinates. A line is closed with x after the closing coordinate. The path is ended with e.

For example:

path="m 1,1 l 1,50, 50,50, 50,1 x e"

This starts at (1,1), draws a line to (1,50), (50,50) and (50,1), where the line is closed and the path ended.

The coordinates specified correspond to relative coordinate space (the size of units in relative space can be set by the @CoordSize attribute). The shape’s actual size is determined by the @Height and @Width attributes.

For example:

<v:shape style="position:relative;top:1;left:1;width:5000;
  height:5000" fillcolor="teal"
  path="m 1,1 l 1,10 10,10 10,1 1,1 x e" />

<v:shape  style="position:relative;top:1;left:1;width:2500;
  height:2500" fillcolor="teal"
  path="m 1,1 l 1,10 10,10 10,1 1,1 x e" />

More than one closed line path may be specified in the @Path attribute and each closed region is filled.

<v:shape  style="position:relative;top:1;left:1;width:5000;
  height:5000" fillcolor="teal"
  path="m 1,1 l 1,10 10,10 10,1 1,1 x m 20,20 l 20,40 40,40
  40,20 20,20 x e" />

The optional <Path> element, which allows for the creation of more complex paths and regions, overrides the @Path attribute if it is specified.