Watch Face Format version <button value="5" default="">Version 5</button> <button value="4">Version 4</button> <button value="3">Version 3</button> <button value="2">Version 2</button> <button value="1">Version 1</button>

*** ** * ** ***

Draws a Rectangle shape.

## Syntax

```xml
<Rectangle x="float" y="float" width="float" height="float" />
```

## Attributes

The `Rectangle` element must contain the following attributes:

`x`, `y`, `width`, `height`

:   A collection of [geometric attributes](https://developer.android.com/training/wearables/wff/group/part/draw/style/stroke) that specify the rectangle's size
    and position.

    These attributes are [transformable](https://developer.android.com/training/wearables/wff/common/transform/transform).

## Inner elements

The `Rectangle` element must contain either a single [`Stroke`](https://developer.android.com/training/wearables/wff/group/part/draw/style/stroke) element or a
single [`Fill`](https://developer.android.com/training/wearables/wff/group/part/draw/style/fill) element.

A rectangle can also optionally contain any number of the following elements:

- [`Transform`](https://developer.android.com/training/wearables/wff/common/transform/transform)
- [`Reference`](https://developer.android.com/training/wearables/wff/common/reference/reference)

## Recommended for you

- Note: link text is displayed when JavaScript is off
- [Rectangle](https://developer.android.com/training/wearables/wff/v2/group/part/draw/shape/rectangle)
- [Ellipse](https://developer.android.com/training/wearables/wff/group/part/draw/shape/ellipse)
- [RoundRectangle](https://developer.android.com/training/wearables/wff/group/part/draw/shape/round-rectangle)