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

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

# Image.Stretch

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

## Stretch

Gets or sets a value that describes how an Image should be stretched to fill the destination rectangle.

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
image.Stretch: Stretch
```

### Returns

`Stretch` — 

### Examples

C#:

```csharp
var image = new Image { Width = 200, Height = 50, Stretch = Stretch.Fill };
image.Source = new SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>");
Chart.AddControl(image);
```

Python:

```python
image = Image()
image.Width = 200
image.Height = 50
image.Stretch = Stretch.Fill
image.Source = SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>")
api.Chart.AddControl(image)
```

