---
id: "P:cAlgo.API.Shape.Stretch"
kind: "property"
type: "T:cAlgo.API.Shape"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/Stretch/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Shape.Stretch

Member of [Shape](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Shape/index.md).

## Stretch

Gets or sets the stretch value.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public Stretch Stretch {get; set;}
```

Python:

```python
shape.Stretch: Stretch
```

### Returns

`Stretch` — 

### Examples

C#:

```csharp
var polygon = new Polygon { Width = 200, Height = 100, FillColor = Color.Purple, Stretch = Stretch.Uniform };
polygon.Points = new[] { new Point(0, 10), new Point(10, 0), new Point(20, 10) };
Chart.AddControl(polygon);
```

Python:

```python
polygon = Polygon()
polygon.Width = 200
polygon.Height = 100
polygon.FillColor = Color.Purple
polygon.Stretch = Stretch.Uniform
polygon.Points = [Point(0, 10), Point(10, 0), Point(20, 10)]
api.Chart.AddControl(polygon)
```

