rectangle Element

The rectangle element creates a perfect rectangle or a square with the attributes described below.

Syntax

<rectangle id="objectId" x="xPosition" y="yPosition" width="rectangleWidth" height="rectangleHeight"
                [lineStyle="lineStyleId"] [fillStyle="fillStyleId"] [fillTransform="transform"]
/>

Attributes

Name

Description

Value type

Optional

Default Value

id

Object identifier

string

no

-

x

Absolute x position (in pixels or twips)

coordinate

no

-

y

Absolute y position (in pixels or twips)

coordinate

no

-

width

Rectangle width (in pixels or twips)

coordinate

no

-

height

Rectangle height (in pixels or twips)

coordinate

no

-

lineStyle

Line style element id (from styles collection)

string

yes

-

fillStyle

Fill style element id (from styles collection)

string

yes

-

fillTransform

Transforms shape fill style (rotate, scale, move, skew) using using script-style transformation notation.

transform

yes

-

Parent Elements

objects collection

See Also

XML Schema Reference, objects collection.