Shape Type Example (VML)


Purpose

This example shows how to use the ShapeType element to define a shape that can be reused.

Example


Code

<!-- Include the VML behavior -->
<style>v\: * { behavior:url(#default#VML);display:inline-block }</style>

<!-- Declare the VML namespace -->
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />

<v:shapetype id="MyShape" coordsize="21600,21600" fillcolor="red" strokecolor="blue" 
  path="m10860,2187c10451,1746,9529,1018,9015,730,7865,152,6685,0,5415,0,4175,152,2995,575,1967,1305,1150,2187,575,3222,242,4220,0,5410,242,6560,575,7597l10860,21600,20995,7597c21480,6560,21600,5410,21480,4220,21115,3222,20420,2187,19632,1305,18575,575,17425,152,16275,0,15005,0,13735,152,12705,730,12176,1018,11254,1746,10860,2187xe" />

<v:shape type="#MyShape" coordsize="21600,21600" style="height:80px;width:100px" />
<v:shape type="#MyShape" coordsize="21600,21600" fillcolor="maroon" style="height:90px;width:70px" />