---
title: "strokeEllipse(in:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/strokeellipse(in:)"
---

# strokeEllipse(in:)

Strokes an ellipse that fits inside the specified rectangle.

## Declaration

```swift
func strokeEllipse(in rect: CGRect)
```

## Parameters

- `rect`: A rectangle that defines the area for the ellipse to fit in.

## Discussion

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

## See Also

### Drawing Shapes

- [clear(_:)](coregraphics/cgcontext/clear(_:).md)
- [fill(_:)](coregraphics/cgcontext/fill(_:)-7a0rk.md)
- [fill(_:)](coregraphics/cgcontext/fill(_:)-6jc4y.md)
- [fillEllipse(in:)](coregraphics/cgcontext/fillellipse(in:).md)
- [stroke(_:)](coregraphics/cgcontext/stroke(_:).md)
- [stroke(_:width:)](coregraphics/cgcontext/stroke(_:width:).md)
- [strokeLineSegments(between:)](coregraphics/cgcontext/strokelinesegments(between:).md)
