---
title: fillRule
framework: quartzcore
role: symbol
role_heading: Instance Property
path: quartzcore/cashapelayer/fillrule
---

# fillRule

The fill rule used when filling the shape’s path.

## Declaration

```swift
var fillRule: CAShapeLayerFillRule { get set }
```

## Discussion

Discussion The possible values are shown in Shape Fill Mode Values. The default is nonZero. See Winding Rules for examples of the two fill rules.

## See Also

### Accessing Shape Style Properties

- [fillColor](quartzcore/cashapelayer/fillcolor.md)
- [lineCap](quartzcore/cashapelayer/linecap.md)
- [lineDashPattern](quartzcore/cashapelayer/linedashpattern.md)
- [lineDashPhase](quartzcore/cashapelayer/linedashphase.md)
- [lineJoin](quartzcore/cashapelayer/linejoin.md)
- [lineWidth](quartzcore/cashapelayer/linewidth.md)
- [miterLimit](quartzcore/cashapelayer/miterlimit.md)
- [strokeColor](quartzcore/cashapelayer/strokecolor.md)
- [strokeStart](quartzcore/cashapelayer/strokestart.md)
- [strokeEnd](quartzcore/cashapelayer/strokeend.md)
