<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGContext/drawPath(using:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGContextDrawPath"
  },
  "title" : "drawPath(using:)"
}
-->

# drawPath(using:)

Draws the current path using the provided drawing mode.

```
func drawPath(using mode: CGPathDrawingMode)
```

## Parameters

`mode`

A path drawing mode constant—[`CGPathDrawingMode.fill`](/documentation/CoreGraphics/CGPathDrawingMode/fill), [`CGPathDrawingMode.eoFill`](/documentation/CoreGraphics/CGPathDrawingMode/eoFill), [`CGPathDrawingMode.stroke`](/documentation/CoreGraphics/CGPathDrawingMode/stroke), [`CGPathDrawingMode.fillStroke`](/documentation/CoreGraphics/CGPathDrawingMode/fillStroke), or [`CGPathDrawingMode.eoFillStroke`](/documentation/CoreGraphics/CGPathDrawingMode/eoFillStroke). For a discussion of these constants, see [`CGPath`](/documentation/CoreGraphics/CGPath).

## Discussion

The current path is cleared as a side effect of calling this function.

## See Also

[`CGContextEOFillPath`](/documentation/CoreGraphics/CGContextEOFillPath)

Paints the area within the current path, using the even-odd fill rule.

[`CGContextFillPath`](/documentation/CoreGraphics/CGContextFillPath)

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



---

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)