---
title: windingRule
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsbezierpath/windingrule-swift.property
---

# windingRule

The winding rule used to fill the path.

## Declaration

```swift
var windingRule: NSBezierPath.WindingRule { get set }
```

## Discussion

Discussion This value may be either NSNonZeroWindingRule or NSEvenOddWindingRule. This value overrides the default value returned by the defaultWindingRule method.

## See Also

### Related Documentation

- [fill()](appkit/nsbezierpath/fill().md)
- [defaultWindingRule](appkit/nsbezierpath/defaultwindingrule.md)

### Accessing a Path’s Attributes

- [lineCapStyle](appkit/nsbezierpath/linecapstyle-swift.property.md)
- [lineJoinStyle](appkit/nsbezierpath/linejoinstyle-swift.property.md)
- [lineWidth](appkit/nsbezierpath/linewidth.md)
- [miterLimit](appkit/nsbezierpath/miterlimit.md)
- [flatness](appkit/nsbezierpath/flatness.md)
- [getLineDash(_:count:phase:)](appkit/nsbezierpath/getlinedash(_:count:phase:).md)
- [setLineDash(_:count:phase:)](appkit/nsbezierpath/setlinedash(_:count:phase:).md)
