[Table of Contents] [docx version]

VML Reference Material - VML

shapedefaults (New Shape Defaults)

This element specifies the defaults that are used when creating new shapes. These defaults are stored once per document.

[Example: Consider a case in which an application chooses to store the highest shape ID it has used in the document thus far. This could be used to support the generation of new shape IDs:

<o:shapedefaults v:ext="edit" spidmax="1029"/>

end example]

Parent Elements

background2.2.1); hdrShapeDefaults2.15.1.50); object2.3.3.19); pict2.3.3.21); pict2.9.23); shapeDefaults2.15.1.79)

 

Child Elements

Subclause

callout (Callout)

§6.2.2.2

colormenu (UI Default Colors)

§6.2.2.4

colormru (Most Recently Used Colors)

§6.2.2.5

extrusion (3D Extrusion)

§6.2.2.10

fill (Shape Fill Properties)

§6.1.2.5

lock (Shape Protections)

§6.2.2.17

shadow (Shadow Effect)

§6.1.2.18

skew (Skew Transform)

§6.2.2.30

stroke (Line Stroke Settings)

§6.1.2.21

textbox (Text Box)

§6.1.2.22

 

Attributes

Description

allowincell (Allow in Table Cell)

Specifies whether the shape is allowed to be placed in a table cell. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

ext (VML Extension Handling Behavior)

 

Namespace: urn:schemas-microsoft-com:vml

Specifies an optional value that indicates how applications that implement VML should interpret extensions not defined as part of the original specification of core VML.

 

[Rationale: This part of the original VML specification is included to assist applications that leverage existing VML support in implementing the Office Open XML Format. end rationale]

 

The possible values for this attribute are defined by the ST_Ext simple type (§6.1.3.3).

fill (Shape Fill Toggle)

Specifies whether the closed path will be filled. Default is true. This attribute is overridden by the fill on attribute.

 

[Example:

 

<v:shape ... fill="f" fillcolor="red" ...>

</v:shape>

 

 

end example]

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

fillcolor (Default Fill Color)

Specifies the default shape fill color. Default is no value. Colors are typically specified as either a named color, such as red, or six hexadecimal digits representing the red, green and blue values of the color, such as #00FF30. Full details are specified in the simple type description.

 

The possible values for this attribute are defined by the ST_ColorType simple type (§6.2.3.5).

spidmax (Shape ID Optional Storage)

Specifies an optional value that allows applications a mechanism for storing information they need to persist related to shape IDs. Default is 0.

 

The possible values for this attribute are defined by the XML Schema integer datatype.

stroke (Shape Stroke Toggle)

Specifies whether the path defining the shape is stroked with a solid line. The stroke element (§6.1.2.21) defines other strokes. The on attribute of the stroke element overrides this attribute. Default is true.

 

[Example:

 

<v:shape ... fillcolor="red"

stroke="false" strokecolor="blue"...>

</v:shape>

 

 

end example]

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

strokecolor (Shape Stroke Color)

Specifies the primary color of the brush to use to stroke the path of the shape. Default is black. The color attribute of the stroke element (§6.1.2.21) overrides this. Colors are typically specified as either a named color, such as red, or six hexadecimal digits representing the red, green and blue values of the color, such as #00FF30. Full details are specified in the simple type description.

 

[Example:

 

<v:shape ... strokecolor="red" ...>

</v:shape>

 

 

end example]

 

The possible values for this attribute are defined by the ST_ColorType simple type (§6.2.3.5).

style (Shape Styling Properties)

Specifies the CSS2 styling properties of the shape. This uses the syntax described in the "Visual formatting model" of the Cascading Style Sheets, Level 2 specification, a Recommendation of the World Wide Web Consortium available here: http://www.w3.org/TR/REC-CSS2. Full descriptions of each property are not repeated here, but the VML treatment of each property is defined. Allowed properties include:

 

Property

Description

flip

Specifies that the orientation of a shape is flipped. Default is no value. Allowed values are:

 

x - Flip along the y-axis, reversing the x-coordinates.

y - Flip along the x-axis, reversing the y-coordinates.

xy - Flip along both the y- and x-axis.

yx - Flip along both the x- and y-axis.

height

Specifies the height of the containing block of the shape.  Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. Allowed values are:

   

auto - Default position of an element in the flow of the page.

<units>- A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's height.

left

Specifies the position of the left of the containing block of the shape relative to the element left of it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline. Allowed values are:

   

auto - Default position of an element in the flow of the page.

<units> - A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's width.

margin-bottom

Specifies the position of the bottom of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. Allowed values are:

   

auto - Default position of an element in the flow of the page.

<units>- A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's height.

margin-left

Specifies the position of the left of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. Allowed values are:

   

auto - Default position of an element in the flow of the page.

<units>- A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's width.

margin-right

Specifies the position of the right of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. Allowed values are:

   

auto - Default position of an element in the flow of the page.

<units> - A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's width.

margin-top

Specifies the position of the top of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. Allowed values are:

 

auto - Default position of an element in the flow of the page.

<units>- A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's height.

mso-position-horizontal

Specifies the horizontal positioning data for objects in WordprocessingML documents. Default is absolute. Allowed values are:

 

absolute

left

center

right

inside

outside

mso-position-horizontal-relative

Specifies relative horizontal position data for objects in WordprocessingML documents. This modifies the mso-position-horizontal property. Default is text. Allowed values are:

 

margin

page

text

char

mso-position-vertical

Specifies the vertical positioning data for objects in WordprocessingML documents. Default is absolute. Allowed values are:

 

absolute

top

center

bottom

inside

outside

mso-position-vertical-relative

Specifies relative vertical position data for objects in WordprocessingML documents. This modifies the mso-position-vertical property. Default is text. Allowed values are:

 

margin

page

text

line

mso-wrap-distance-bottom

Specifies the distance from the bottom of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.

mso-wrap-distance-left

Specifies the distance from the left side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.

mso-wrap-distance-right

Specifies the distance from the right side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.

mso-wrap-distance-top

Specifies the distance from the top of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.

mso-wrap-edited

Specifies whether the wrap coordinates were customized by the user. If the wrap coordinates are generated by an editor, this property is true; otherwise they were customized by a user. Default is false.

mso-wrap-style

Specifies the wrapping mode for text in shapes in WordprocessingML documents. Default is square. Allowed values are:

 

square - Wraps text inside the shape in a square.

none - Text does not wrap.

position

Specifies the type of positioning used to place an element. Default is static. When the element is contained inside a group, this property must be absolute. Allowed values are:

 

static - The element is positioned according to the normal flow of the page. The top and left properties are ignored. If the object is anchored inline, this value is used.

absolute - The element is positioned relative to the parent, using the top and left properties.

relative - The element is positioned according to the normal flow of the page, but the top and left properties are used. The overlap of overlapping elements is governed by the z-index property.

rotation

Specifies the angle that a shape is rotated, in degrees. Default is 0. Positive angles are clockwise.

top

Specifies the position of the top of the containing block of the shape relative to the element above it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline. Allowed values are:

 

auto - Default position of an element in the flow of the page.

<units>- A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's height.

visibility

Specifies whether a shape is displayed. Only inherit and hidden are used; any other values are mapped to inherit. Default is inherit. Allowed values are:

 

hidden - The shape is not visible, but is still part of the flow of the objects in the browser. Mouse events are not processed.

inherit - The visibility state is inherited from the parent of the shape.

width

Specifies the width of the containing block of the shape.  Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. Allowed values are:

   

auto - Default position of an element in the flow of the page.

<units>- A number with an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). If no units are given, pixels (px) is assumed.

<percentage>- Value expressed as a percentage of the parent object's width.

z-index

Specifies the display order of overlapping shapes. Default is 0. This property shall not be used for shapes anchored inline. Allowed values are:

 

auto - Uses the order that the shapes appear in the page, bottom to top.

<order>- A number that represents the stacking precedence. Shapes with higher numbers are placed on top of those with lower numbers. Negative numbers are allowed.

 

The following properties are only used by the textbox element (§6.1.2.22):

 

Property

Description

direction

Specifies the direction of the text in the textbox. Default is ltr. This property is superceded by the mso-direction-alt property if that is specified. Allowed values are:

 

ltr - Test is displayed left-to-right.

rtl - Test is displayed right-to-left.

 

layout-flow

Determines the flow of the text layout in a textbox. Default is horizontal. Allowed values are:

 

horizontal - Text is displayed horizontally.

vertical - Text is displayed vertically.

vertical-ideographic - Ideographic text is displayed vertically.

horizontal-ideographic - Ideographic text is displayed horizontally.

 

mso-direction-alt

Specifies an alternate direction for text in textboxes. Overrides the direction property. The only allowed value is context.

mso-fit-shape-to-text

Specifies whether the shape stretches to fit the text in the textbox. Default is false.

mso-fit-text-to-shape

Specifies whether the text stretches to fit the textbox. Default is false.

mso-layout-flow-alt

Specifies the alternate layout flow for text in textboxes. This property is used instead of layout-flow when the layout flow is from bottom to top for non-ideographic languages.  Its only value is bottom-to-top.

mso-next-textbox

Specifies the ID of the next textbox in a series. Used to keep track of a set of linked textboxes. Default is no value.

mso-rotate

Specifies a specific rotation value for text in a textbox. Default is 0. Allowed values are:

 

0

90

180

-90

mso-text-scale

Specifies the scaling factor for fitting text to shapes. Default is 0. This property is only used if mso-fit-text-to-shape is true.

v-text-anchor

Specifies the vertical anchoring of text in a textbox. Default is top. The alignment of a text anchor only becomes evident if mso-fit-text-to-shape is false. This property is different from the vertical-align CSS property, which is used for ideographic languages. Allowed values are:

 

top

middle

bottom

top-center

middle-center

bottom-center

top-baseline

bottom-baseline

top-center-baseline

bottom-center-baseline

 

The following properties are only used by the textpath element (§6.1.2.23):

 

Property

Description

font

Specifies a compound value of font settings. Default is no value. The values are the same as those of the CSS font property. The order of definitions in the string is: font-style, font-variant, font-weight, font-size, line-height, font-family.

font-family

Specifies the family of the font. Default is no value. The values are the same as those of the CSS font-family property.

font-size

Specifies the size of the font. Default is no value. The font size is defined in points. The values are the same as those of the CSS font-size property.

font-style

Specifies the amount of slant for a font. Default is normal. The values are the same as those of the CSS font-style property. Allowed values are:

 

normal

italic

oblique - Treated the same as italic.

font-variant

Specifies the variant style of a font. Default is normal. The values are the same as those of the CSS font-variant property. Allowed values are:

 

normal

small-caps

font-weight

Specifies the thickness of the letters of the font. Default is normal. The values are the same as those of the CSS font-weight property. Allowed values are:

 

Value

Description

normal

lighter

100

200

300

400

Treated as non-bold.

bold

bolder

500

600

700

800

900

Treated as bold.

 

mso-text-shadow

Specifies whether a shadow is applied to the text on a text path. Default is false.

text-decoration

Specifies the style of text decoration. Default is none. The values are the same as those of the CSS text-decoration property. Allowed values are:

 

none

underline

overline

line-through

blink

v-rotate-letters

Specifies whether the letters of the text are rotated counterclockwise by 90 degrees. Default is false.

v-same-letter-heights

Specifies whether all letters will be the same height regardless of initial case. If true, the lowercase letters are stretched to the height of the uppercase letters. Default is false.

v-text-align

Specifies the alignment of text. Default is left. Allowed values are:

 

left

right

center

justify

letter-justify - Distributes the extra space between the letters.

stretch-justify - Stretches the letters to fill in the space.

v-text-kern

Specifies whether kerning is turned on. Default is false.

v-text-reverse

Specifies whether the layout order of rows is reversed. Default is false. This is used for vertical text layout.

v-text-spacing-mode

Specifies the mode for letter spacing. Default is tightening. This property determines whether space will be removed between each letter (tightening) or added between each letter (tracking). The amount of letter spacing change is defined by the v-text-spacing property. Allowed values are:

 

tightening

tracking

v-text-spacing

Specifies the amount of spacing for text in 100ths of single line spacing. Default is 100.

 

The line6.1.2.12), polyline6.1.2.15) and curve6.1.2.3) elements ignore the following properties:

 

top

left

width

height

 

The following properties are not inherited by an element that references a shapetype element (§6.1.2.20) via the id attribute:

 

flip

height

left

margin-left

margin-top

position

rotation

top

visibility

width

z-index

 

The possible values for this attribute are defined by the XML Schema string datatype.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_ShapeDefaults">

   <all minOccurs="0">

   <element ref="v:fill" minOccurs="0"/>

   <element ref="v:stroke" minOccurs="0"/>

   <element ref="v:textbox" minOccurs="0"/>

   <element ref="v:shadow" minOccurs="0"/>

   <element ref="skew" minOccurs="0"/>

   <element ref="extrusion" minOccurs="0"/>

   <element ref="callout" minOccurs="0"/>

   <element ref="lock" minOccurs="0"/>

   <element name="colormru" minOccurs="0" type="CT_ColorMru"/>

   <element name="colormenu" minOccurs="0" type="CT_ColorMenu"/>

   </all>

   <attributeGroup ref="v:AG_Ext"/>

   <attribute name="spidmax" type="xsd:integer" use="optional"/>

   <attribute name="style" type="xsd:string" use="optional"/>

   <attribute name="fill" type="ST_TrueFalse" use="optional"/>

   <attribute name="fillcolor" type="ST_ColorType" use="optional"/>

   <attribute name="stroke" type="ST_TrueFalse" use="optional"/>

   <attribute name="strokecolor" type="ST_ColorType"/>

   <attribute name="allowincell" form="qualified" type="ST_TrueFalse"/>

</complexType>