---
title: "drawPath(using:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/drawpath(using:)"
---

# drawPath(using:)

Draws the current path using the provided drawing mode.

## Declaration

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

## Parameters

- `mode`: A path drawing mode constant—doc://com.apple.coregraphics/documentation/CoreGraphics/CGPathDrawingMode/fill, doc://com.apple.coregraphics/documentation/CoreGraphics/CGPathDrawingMode/eoFill, doc://com.apple.coregraphics/documentation/CoreGraphics/CGPathDrawingMode/stroke, doc://com.apple.coregraphics/documentation/CoreGraphics/CGPathDrawingMode/fillStroke, or doc://com.apple.coregraphics/documentation/CoreGraphics/CGPathDrawingMode/eoFillStroke. For a discussion of these constants, see doc://com.apple.coregraphics/documentation/CoreGraphics/CGPath.

## Discussion

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

## See Also

### Drawing the Current Graphics Path

- [CGPathDrawingMode](coregraphics/cgpathdrawingmode.md)
- [fillPath(using:)](coregraphics/cgcontext/fillpath(using:).md)
- [strokePath()](coregraphics/cgcontext/strokepath().md)
