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

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

# Polygon.FillRule

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

## FillRule

Gets or sets a FillRule enumeration that specifies how the interior fill of the shape is determined.

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 FillRule FillRule {get; set;}
```

Python:

```python
polygon.FillRule: FillRule
```

### Returns

`FillRule` — 

### Examples

C#:

```csharp
var star = new Polygon { FillColor = Color.Gold, FillRule = FillRule.Nonzero };
star.Points = new[] { new Point(50, 0), new Point(80, 100), new Point(0, 35), new Point(100, 35), new Point(20, 100) };
Chart.AddControl(star);
```

Python:

```python
star = Polygon()
star.FillColor = Color.Gold
star.FillRule = FillRule.Nonzero
star.Points = [Point(50, 0), Point(80, 100), Point(0, 35), Point(100, 35), Point(20, 100)]
api.Chart.AddControl(star)
```

