<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKOverlayPathRenderer/fillPath(_:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKOverlayPathRenderer(im)fillPath:inContext:"
  },
  "title" : "fillPath(_:in:)"
}
-->

# fillPath(_:in:)

Fills the area that the specified path encloses.

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

## Parameters

`path`

The path to fill.

`context`

The graphics context in which to draw the path.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)