ShapeType Element

The <ShapeType> element defines a definition, or template, for a shape. Such a template is “instantiated” by creating a <Shape> element that references the <ShapeType>. The shape can override any value specified by its <ShapeType>, or define attributes and elements the <ShapeType> does not provide. A <ShapeType> may not reference another <ShapeType>.

The attributes and elements a <ShapeType> uses are identical to those of the <Shape> element, with these exceptions.

<ShapeType> may not use the <Type> element.

CSS positioning attributes are ignored and not passed to individual <Shape> instances.

Visibility is always hidden.

A VML authoring agent may make the <ShapeType> visible, in which case the CSS positioning attributes are meaningful.

The <ShapeType> element is used to define a shape once and reference it multiple times throughout a document. One of the most useful attributes or elements a <ShapeType> defines is a complex Path. Since Path coordinates are defined in a relative coordinate space that scales with a shape’s height and width, this is very flexible for defining a shape outline that can be custom scaled and formatted for a given use.