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

# setAllowsAntialiasing(_:)

Sets whether or not to allow antialiasing for a graphics context.

## Declaration

```swift
func setAllowsAntialiasing(_ allowsAntialiasing: Bool)
```

## Parameters

- `allowsAntialiasing`: A Boolean value that specifies whether or not to allow antialiasing. Pass true to allow antialiasing; false otherwise. This parameter is not part of the graphics state.

## Discussion

Discussion Core Graphics performs antialiasing for a graphics context if both the allowsAntialiasing parameter and the graphics state parameter shouldAntialias are true. This parameter is not part of the graphics state.

## See Also

### Setting Path Drawing Options

- [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)
- [setMiterLimit(_:)](coregraphics/cgcontext/setmiterlimit(_:).md)
- [setPatternPhase(_:)](coregraphics/cgcontext/setpatternphase(_:).md)
- [setFillPattern(_:colorComponents:)](coregraphics/cgcontext/setfillpattern(_:colorcomponents:).md)
- [setShouldAntialias(_:)](coregraphics/cgcontext/setshouldantialias(_:).md)
