---
title: CGContextFillPath
framework: coregraphics
role: symbol
role_heading: Function
path: coregraphics/cgcontextfillpath
---

# CGContextFillPath

Paints the area within the current path, using the nonzero winding number rule.

## Declaration

```occ
extern void CGContextFillPath(CGContextRef c);
```

## Parameters

- `c`: A graphics context that contains a path to fill.

## Discussion

Discussion Each subpath is treated as if it were closed by calling closePath(). The nonzero winding number rule is described in Filling a Path in Quartz 2D Programming Guide. The current path is cleared as a side effect of calling this function.

## See Also

### Drawing the Current Graphics Path

- [drawPath(using:)](coregraphics/cgcontext/drawpath(using:).md)
- [CGPathDrawingMode](coregraphics/cgpathdrawingmode.md)
- [CGContextEOFillPath](coregraphics/cgcontexteofillpath.md)
- [strokePath()](coregraphics/cgcontext/strokepath().md)
