[Table of Contents] [docx version]

VML Reference Material - VML

top (Text Box Top Stroke)

This element specifies the stroke properties for the top border of a text box. It entirely supercedes its parent stroke element if its on attribute is true. Thus the default value of an unspecified attribute overrides a value specified in the parent. If the on attribute is false or not specified, the border is not shown.

[Example: The text box borders are set independently. Note that the bottom border does not inherit the weight from the parent stroke element.

<v:stroke weight="2.25pt">

<o:left v:ext="view" dashstyle="1 1" color="blue" weight="5pt" on="t"/>

<o:top v:ext="view" color="black" weight="2.25pt" on="t"/>

<o:right v:ext="view" dashstyle="1 1" color="blue" weight="5pt" on="t"/>

<o:bottom v:ext="view" color="black" on="t"/>

<o:column v:ext="view" color="#f60" on="t"/>

</v:stroke>

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); stroke6.1.2.21)

 

Attributes

Description

althref (Alternate Image Reference)

Specifies an alternate reference for an image in Macintosh PICT format.

 

[Example:

 

<v:stroke ... althref="myimage.pcz" ... >

</v:stroke>

 

end example]

 

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

color (Stroke Color)

Specifies the stroke color. Overrides the strokecolor attribute of a shape. Default is black. See the fillcolor attribute for a list of supported named colors.

 

[Example: The shape stroke is blue:

 

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

<v:stroke color="blue"/>

</v:shape>

 

end example]

 

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

color2 (Stroke Alternate Pattern Color)

Specifies a second color for strokes, used when filltype is pattern. Default is no value.

 

When a pattern fill is used for the stroke, the stroke color is used in colored parts of the source image. The color2 defines an alternate color to use in place of black in the source image.

 

[Example: This unusual example is intended to demonstrate how the image and colors interact to create a patterned stroke. The yellow background shows transparency. The non-square shape and square image create an effective offset. The heavy stroke weight shows more of the image. The green shape fill shows how the stroke is overlaid on the shape.

 

<v:background fillcolor="yellow"/>

<v:shape style="width:60;height:50"

strokecolor="red" fillcolor="lime"

path="m 0,0 l 0,1000 1000,1000 1000,0 x e">

<v:stroke filltype="pattern" weight="10pt"

src="myimage.gif" color2="blue"/>

</v:shape>

 

, where myimage.gif is:

 

end example]

 

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

dashstyle (Stroke Dash Pattern)

Specifies the dot and dash pattern for a stroke. Default is solid. Pre-defined values are:

 

solid

shortdash

shortdot

shortdashdot

shortdashdotdot

dot

dash

longdash

dashdot

longdashdot

longdashdotdot

 

A custom-defined dash pattern may also be specified using a series of numbers. These define the length of the dash (the drawn part of the stroke) and the length of the space between the dashes. The lengths are relative to the line width: a length of 1 is equal to the line width. The endcap style is applied to each dash but the arrow style is not. The string defines the length of the dash then the length of the space. This may be repeated to form complex dash styles. The string should always contain a pair of numbers; if it contains an odd number of numbers the last is disregarded. 0 implies a dot that is fourfold symmetrical (with round end caps, this is a circle).

 

[Example:

 

<v:stroke dashstyle="0 2" weight="3pt"

endcap="round">

</v:stroke>

 

 

<v:stroke dashstyle="longdashdotdot"

weight="2pt">

</v:stroke>

 

 

end example]

 

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

endarrow (Line End Arrowhead)

Specifies an arrowhead for the end of a line. Default is none. Note that the path must not be closed with the x command for the arrowhead to show. Allowed values are:

 

none

block

classic

diamond

oval

open

 

[Example:

 

<v:stroke endarrow="classic"/>

 

 

end example]

 

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

endarrowlength (Line End Arrowhead Length)

Specifies the length of the arrowhead at the end of a line. Default is medium. Allowed values are:

 

short

medium

long

 

[Example:

 

<v:stroke ... endarrowlength="long" ... />

 

 

end example]

 

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

endarrowwidth (Line End Arrowhead Width)

Specifies the width of the arrowhead at the end of a line. Default is medium. Allowed values are:

 

narrow

medium

wide

 

[Example:

 

<v:stroke ... endarrowwidth="wide" ... />

 

 

end example]

 

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

endcap (Line End Cap)

Specifies the cap style for the end of a stroke. Default is flat. Allowed values are:

 

flat

square

round

 

[Example:

 

<v:stroke ... endcap="round" weight="10pt" ... />

 

endcap="flat"

endcap="square"

endcap="round"

 

end example]

 

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

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).

filltype (Stroke Image Style)

Specifies the type of fill used for the background of a stroke. Default is solid. Allowed values are:

 

solid - The fill pattern is solid.

tile - The fill image is tiled.

pattern - The fill image is stretched to form a pattern.

frame - The fill image becomes a border for the shape.

 

[Example:

 

<v:shape style="width:50;height:50"

strokecolor="red"

path="m 0,0 l 0,1000 1000,1000 1000,0 x e">

<v:stroke filltype="frame" weight="10pt"

src="border.gif"/>

</v:shape>

 

, where border.gif is:

 

end example]

 

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

forcedash (Force Dashed Outline)

Specifies whether a dashed outline is used to draw a shape when a shape has no line or fill. Default is false.

 

Used by PresentationML placeholders to draw a dashed outline when there is no line and no fill for a shape.

 

[Example:

 

<v:shape ... o:forcedash="true" ... >

</v:shape>

 

end example]

 

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

href (Original Image Reference)

Specifies the URL to the original image file. Used only if the picture has been linked and embedded. Default is no value.

 

[Example:

 

<v:fill ... o:href="myimage.gif" ... >

</v:fill>

 

end example]

 

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

imagealignshape (Stoke Image Alignment)

Specifies the alignment of the stroke image. If true, the image is aligned with the shape. Otherwise, it is aligned with the containing scope. Default is true.

 

[Example: The top position offset shifts the image alignment relative to the containing window:

 

<v:shape fillcolor="silver"

style="top:20;width:50;height:50"

path="m 0,0 l 0,1000 1000,1000 1000,0 x e">

<v:stroke imagealignshape="false" weight="20pt"

filltype="tile" src="myimage.gif"/>

</v:shape>

 

imagealignshape="false"

 

imagealignshape="false"

 

end example]

 

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

imageaspect (Stroke Image Aspect Ratio)

Specifies how the stroke image aspect ratio is preserved. Default is ignore. Allowed values are:

 

Value

Description

ignore

Ignore aspect issues.

atleast

Image is at least as big as imagesize.

atmost

Image is no bigger than imagesize.

 

[Example:

 

<v:stroke filltype="frame" weight="10pt"

src="border.gif" imagealignshape="true"

imageaspect="atleast">

</v:stroke>

 

imagealignshape="ignore"

imagealignshape="atleast"

imagealignshape="atmost"

 

end example]

 

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

imagesize (Stroke Image Size)

Specifies the size of the image for the stroke. Default is the size of the image.

 

[Example:

 

<v:stroke ... imagesize="10pt,10pt" ... />

 

end example]

 

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

insetpen (Inset Border From Path)

Specifies that the border shall be displayed inside of the path defining the shape, rather than along the path (the default border placement), or outside of the path as might be done with an image.

 

[Example:

 

<v:shape ... insetpen="true" ... >

</v:shape>

 

end example]

 

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

joinstyle (Line End Join Style))

Specifies the join style for line ends. Default is round.

 

round

bevel

miter

 

[Example:

 

<v:polyline strokeweight="10pt" strokecolor="navy"

points="10pt,10pt,50pt,50pt,90pt,10pt">

<v:stroke joinstyle="bevel"/>

</v:polyline>   

 

joinstyle="round"

joinstyle="bevel"

joinstyle="miter"

 

end example]

 

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

linestyle (Stroke Line Style)

Specifies the line style of the stroke. Default is single.

 

single

thinThin

thinThick

thickThin

thickBetweenThin

 

[Example:

 

<v:stroke linestyle="thickThin" weight="5pt">

</v:stroke>

 

 

end example]

 

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

miterlimit (Miter Joint Limit)

Specifies the smoothness of the miter joint, or the maximum distance between the inner point and outer point of a joint. This number is a multiple of the thickness of the line. Default is 8.

 

[Example:

 

<v:stroke joinstyle="miter" weight="10pt"

miterlimit="2">

</v:stroke>

 

 

end example]

 

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

on (Stroke Toggle)

Specifies whether the stroke is displayed. Default is true. This attribute overrides the shape's stroke attribute.

 

[Example:

 

<v:rect style="width:50;height:50" stroked="true"

fillcolor="lime" strokecolor="red">

<v:stroke on="false" weight="5pt"/>

</v:rect>

 

 

end example]

 

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

opacity (Stroke Opacity)

Specifies the amount of transparency of a stroke. Default is 1.0.

 

[Example:

 

<v:rect style="width:50;height:50"

fillcolor="lime" strokecolor="red">

<v:stroke weight="5pt" opacity="50%"/>

</v:rect>

 

 

end example]

 

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

src (Stroke Image Location)

Specifies the source image to load for a stroke fill. Default is no value.

 

[Example:

 

<v:stroke ... src="myimage.gif" ... >

</v:stroke>

 

end example]

 

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

startarrow (Line Start Arrowhead)

Specifies an arrowhead for the start of a line. Default is none. Note that the path must not be closed with the x command for the arrowhead to show. Allowed values are:

 

none

block

classic

diamond

oval

open

 

[Example:

 

<v:stroke startarrow="classic"/>

 

 

end example]

 

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

startarrowlength (Line Start Arrowhead Length)

Specifies the length of the arrowhead at the start of a line. Default is medium. Allowed values are:

 

short

medium

long

 

[Example:

 

<v:stroke ... startarrowlength="long" ... />

 

 

end example]

 

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

startarrowwidth (Line Start Arrowhead Width)

Specifies the width of the arrowhead at the start of a line. Default is medium. Allowed values are:

 

narrow

medium

wide

 

[Example:

 

<v:stroke ... startarrowwidth="wide" ... />

 

 

end example]

 

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

title (Stroke Title)

Specifies the title of an embedded stroke image. This is typically set to the comment property of the image, which is often blank.

 

[Example:

 

<v:fill ... o:title="alt text" ... >

</v:fill>

 

end example]

 

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

weight (Stroke Weight)

Specifies the thickness of a stroke. Default is 1. This attribute overrides the shape's strokeweight attribute.

 

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_StrokeChild">

   <attributeGroup ref="v:AG_Ext"/>

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

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

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

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

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

   <attribute name="linestyle" type="v:ST_StrokeLineStyle" use="optional"/>

   <attribute name="miterlimit" type="xsd:decimal" use="optional"/>

   <attribute name="joinstyle" type="v:ST_StrokeJoinStyle" use="optional"/>

   <attribute name="endcap" type="v:ST_StrokeEndCap" use="optional"/>

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

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

   <attribute name="filltype" type="v:ST_FillType" use="optional"/>

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

   <attribute name="imageaspect" type="v:ST_ImageAspect" use="optional"/>

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

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

   <attribute name="startarrow" type="v:ST_StrokeArrowType" use="optional"/>

   <attribute name="startarrowwidth" type="v:ST_StrokeArrowWidth" use="optional"/>

   <attribute name="startarrowlength" type="v:ST_StrokeArrowLength" use="optional"/>

   <attribute name="endarrow" type="v:ST_StrokeArrowType" use="optional"/>

   <attribute name="endarrowwidth" type="v:ST_StrokeArrowWidth" use="optional"/>

   <attribute name="endarrowlength" type="v:ST_StrokeArrowLength" use="optional"/>

   <attribute ref="href"/>

   <attribute ref="althref"/>

   <attribute ref="title"/>

   <attribute ref="forcedash"/>

</complexType>