---
title: "setMiterLimit(_:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/setmiterlimit(_:)"
---

# setMiterLimit(_:)

Sets the miter limit for the joins of connected lines in a graphics context.

## Declaration

```swift
func setMiterLimit(_ limit: CGFloat)
```

## Parameters

- `limit`: The miter limit to use.

## Discussion

Discussion If the current line join style is set to CGLineJoin.miter, the miter limit determines whether the lines should be joined with a bevel instead of a miter. The length of the miter is divided by the line width. If the result is greater than the miter limit, the style is converted to a bevel.

## See Also

### Setting Path Drawing Options

- [setAllowsAntialiasing(_:)](coregraphics/cgcontext/setallowsantialiasing(_:).md)
- [setFlatness(_:)](coregraphics/cgcontext/setflatness(_:).md)
- [setLineCap(_:)](coregraphics/cgcontext/setlinecap(_:).md)
- [setLineDash(phase:lengths:)](coregraphics/cgcontext/setlinedash(phase:lengths:).md)
- [setLineJoin(_:)](coregraphics/cgcontext/setlinejoin(_:).md)
- [setLineWidth(_:)](coregraphics/cgcontext/setlinewidth(_:).md)
- [setPatternPhase(_:)](coregraphics/cgcontext/setpatternphase(_:).md)
- [setFillPattern(_:colorComponents:)](coregraphics/cgcontext/setfillpattern(_:colorcomponents:).md)
- [setShouldAntialias(_:)](coregraphics/cgcontext/setshouldantialias(_:).md)
