Instance Property

usesEvenOddFillRule

A Boolean indicating whether the even-odd winding rule is in use for drawing paths.

Declaration

@property(nonatomic) BOOL usesEvenOddFillRule;

Discussion

If YES, the path is filled using the even-odd rule. If NO, it is filled using the non-zero rule. Both rules are algorithms to determine which areas of a path to fill with the current fill color. A ray is drawn from a point inside a given region to a point anywhere outside the path’s bounds. The total number of crossed path lines (including implicit path lines) and the direction of each path line are then interpreted as follows:

  • For the even-odd rule, if the total number of path crossings is odd, the point is considered to be inside the path and the corresponding region is filled. If the number of crossings is even, the point is considered to be outside the path and the region is not filled.

  • For the non-zero rule, the crossing of a left-to-right path counts as +1 and the crossing of a right-to-left path counts as -1. If the sum of the crossings is nonzero, the point is considered to be inside the path and the corresponding region is filled. If the sum is 0, the point is outside the path and the region is not filled.

The default value of this property is NO. For more information about winding rules and how they are applied to subpaths, see Quartz 2D Programming Guide.

See Also

Accessing Drawing Properties

lineWidth

The line width of the path.

lineCapStyle

The shape of the paths end points when stroked.

lineJoinStyle

The shape of the joints between connected segments of a stroked path.

miterLimit

The limiting value that helps avoid spikes at junctions between connected line segments.

flatness

The factor that determines the rendering accuracy for curved path segments.

- setLineDash:count:phase:

Sets the line-stroking pattern for the path.

- getLineDash:count:phase:

Retrieves the line-stroking pattern for the path.