---
title: "fillPath(_:in:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkoverlaypathrenderer/fillpath(_:in:)"
---

# fillPath(_:in:)

Fills the area that the specified path encloses.

## Declaration

```swift
func fillPath(_ path: CGPath, in context: CGContext)
```

## Parameters

- `path`: The path to fill.
- `context`: The graphics context in which to draw the path.

## Discussion

Discussion You must set the current fill color before calling this method. Typically you do this by calling the applyFillProperties(to:atZoomScale:) method prior to drawing. If the fillColor property is currently nil, this method does nothing.

## See Also

### Drawing the path

- [applyStrokeProperties(to:atZoomScale:)](mapkit/mkoverlaypathrenderer/applystrokeproperties(to:atzoomscale:).md)
- [applyFillProperties(to:atZoomScale:)](mapkit/mkoverlaypathrenderer/applyfillproperties(to:atzoomscale:).md)
- [strokePath(_:in:)](mapkit/mkoverlaypathrenderer/strokepath(_:in:).md)
- [shouldRasterize](mapkit/mkoverlaypathrenderer/shouldrasterize.md)
