9.5 Custom Shape
A <draw:custom-shape>
represents a shape that is capable of rendering complex figures. It is offering
font work and extrusion functionality. A custom shape may have a geometry that
influences its shape. This geometry may be visualized in office application
user interfaces, for instance by displaying interaction handles, that provide a
simple way to modify the the geometry.
<define name="draw-custom-shape">
<element
name="draw:custom-shape">
<ref
name="draw-custom-shape-attlist"/>
<ref
name="common-draw-position-attlist"/>
<ref
name="common-draw-size-attlist"/>
<ref
name="common-draw-shape-with-text-and-styles-attlist"/>
<ref
name="common-draw-caption-id-attlist"/>
<optional>
<ref
name="svg-title"/>
</optional>
<optional>
<ref
name="svg-desc"/>
</optional>
<optional>
<ref
name="office-event-listeners"/>
</optional>
<zeroOrMore>
<ref
name="draw-glue-point"/>
</zeroOrMore>
<ref name="draw-text"/>
<optional>
<ref
name="draw-enhanced-geometry"/>
</optional>
</element>
</define>
The attributes that may be associated with the <draw:custom shape> element are:
�
Position, Size, Style, Layer, Z-Index, ID,
Caption ID and Transformation � see section 9.2.15.
�
Text anchor, table background, draw end position
� see section 9.2.16.
�
Draw engine
�
Draw data
The elements that may be contained in the <draw:custom-shape> element are:
�
Title (short accessible name) � see section
9.2.20.
�
Long description (in support of accessibility) �
see section 9.2.20.
�
Event listeners � see section 9.2.21.
�
Glue points � see section 9.2.19.
�
Text � see section 9.2.17.
�
Enhanced geometry � see section 9.5.1,
Draw Engine
The optional draw:engine
attribute specifies the name of a rendering engine that can be used to render
the custom shape. The attribute's value is a namespaced token, meaning an
identifier prefixed by an XML namespace prefix, just like any attribute or
element name in this specification. The drawing engine may get its data either
from the draw:data attribute, or it may evaluate
the <draw:enhanced-geometry> child element.
If the draw:engine attribute is omitted, the office
application's default enhanced custom shape rendering engine will be used. This
engine gets its geometry data from the <draw:enhanced-geometry> element only.
<define name="draw-custom-shape-attlist"
combine="interleave">
<optional>
<attribute
name="draw:engine">
<ref
name="namespacedToken"/>
</attribute>
</optional>
</define>
Draw Data
The draw:data attribute contains
rendering engine specific data that describes the geometry of the custom shape.
This attribute is only evaluated if a
non default rendering engine is
specified by the draw:engine
attribute.
<define name="draw-custom-shape-attlist"
combine="interleave">
<optional>
<attribute
name="draw:data">
<ref
name="string"/>
</attribute>
</optional>
</define>