---
title: Graphics and rendering modifiers
framework: swiftui
role: collectionGroup
role_heading: API Collection
path: swiftui/view-graphics-and-rendering
---

# Graphics and rendering modifiers

Affect the way the system draws a view, for example by scaling or masking a view, or by applying graphical effects.

## Overview

Overview Use these view modifiers to apply many of the rendering effects typically associated with a graphics context, like adding masks and creating composites. You can apply these effects to graphical views, like Shapes, as well as any other SwiftUI view. When you do need the flexibility of immediate mode drawing in a graphics context, use a Canvas view instead. This can be particularly helpful when you want to draw an extremely large number of dynamic shapes — for example, to create particle effects. For more information about using these effects in your app, see Drawing and graphics.

## Topics

### Masks and clipping

- [mask(alignment:_:)](swiftui/view/mask(alignment:_:).md)
- [clipped(antialiased:)](swiftui/view/clipped(antialiased:).md)
- [clipShape(_:style:)](swiftui/view/clipshape(_:style:).md)
- [containerShape(_:)](swiftui/view/containershape(_:).md)

### Scale

- [scaledToFill()](swiftui/view/scaledtofill().md)
- [scaledToFill3D()](swiftui/view/scaledtofill3d().md)
- [scaledToFit()](swiftui/view/scaledtofit().md)
- [scaledToFit3D()](swiftui/view/scaledtofit3d().md)
- [scaleEffect(_:anchor:)](swiftui/view/scaleeffect(_:anchor:).md)
- [scaleEffect(x:y:anchor:)](swiftui/view/scaleeffect(x:y:anchor:).md)
- [scaleEffect(x:y:z:anchor:)](swiftui/view/scaleeffect(x:y:z:anchor:).md)
- [imageScale(_:)](swiftui/view/imagescale(_:).md)
- [aspectRatio(_:contentMode:)](swiftui/view/aspectratio(_:contentmode:).md)
- [aspectRatio3D(_:contentMode:)](swiftui/view/aspectratio3d(_:contentmode:).md)

### Rotation and transformation

- [rotationEffect(_:anchor:)](swiftui/view/rotationeffect(_:anchor:).md)
- [rotation3DEffect(_:anchor:)](swiftui/view/rotation3deffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/rotation3deffect(_:axis:anchor:anchorz:perspective:).md)
- [rotation3DEffect(_:axis:anchor:)](swiftui/view/rotation3deffect(_:axis:anchor:).md)
- [rotation3DLayout(_:)](swiftui/view/rotation3dlayout(_:).md)
- [rotation3DLayout(_:axis:)](swiftui/view/rotation3dlayout(_:axis:).md)
- [perspectiveRotationEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/perspectiverotationeffect(_:axis:anchor:anchorz:perspective:).md)
- [projectionEffect(_:)](swiftui/view/projectioneffect(_:).md)
- [transformEffect(_:)](swiftui/view/transformeffect(_:).md)
- [transform3DEffect(_:)](swiftui/view/transform3deffect(_:).md)

### Graphical effects

- [blur(radius:opaque:)](swiftui/view/blur(radius:opaque:).md)
- [opacity(_:)](swiftui/view/opacity(_:).md)
- [brightness(_:)](swiftui/view/brightness(_:).md)
- [contrast(_:)](swiftui/view/contrast(_:).md)
- [colorInvert()](swiftui/view/colorinvert().md)
- [colorMultiply(_:)](swiftui/view/colormultiply(_:).md)
- [saturation(_:)](swiftui/view/saturation(_:).md)
- [grayscale(_:)](swiftui/view/grayscale(_:).md)
- [hueRotation(_:)](swiftui/view/huerotation(_:).md)
- [luminanceToAlpha()](swiftui/view/luminancetoalpha().md)
- [shadow(color:radius:x:y:)](swiftui/view/shadow(color:radius:x:y:).md)
- [visualEffect(_:)](swiftui/view/visualeffect(_:).md)
- [visualEffect3D(_:)](swiftui/view/visualeffect3d(_:).md)
- [materialActiveAppearance(_:)](swiftui/view/materialactiveappearance(_:).md)

### Shaders

- [colorEffect(_:isEnabled:)](swiftui/view/coloreffect(_:isenabled:).md)
- [distortionEffect(_:maxSampleOffset:isEnabled:)](swiftui/view/distortioneffect(_:maxsampleoffset:isenabled:).md)
- [layerEffect(_:maxSampleOffset:isEnabled:)](swiftui/view/layereffect(_:maxsampleoffset:isenabled:).md)

### Composites

- [blendMode(_:)](swiftui/view/blendmode(_:).md)
- [compositingGroup()](swiftui/view/compositinggroup().md)
- [drawingGroup(opaque:colorMode:)](swiftui/view/drawinggroup(opaque:colormode:).md)

### Animations

- [animation(_:)](swiftui/view/animation(_:).md)
- [animation(_:value:)](swiftui/view/animation(_:value:).md)
- [animation(_:body:)](swiftui/view/animation(_:body:).md)
- [contentTransition(_:)](swiftui/view/contenttransition(_:).md)
- [geometryGroup()](swiftui/view/geometrygroup().md)
- [keyframeAnimator(initialValue:repeating:content:keyframes:)](swiftui/view/keyframeanimator(initialvalue:repeating:content:keyframes:).md)
- [keyframeAnimator(initialValue:trigger:content:keyframes:)](swiftui/view/keyframeanimator(initialvalue:trigger:content:keyframes:).md)
- [matchedGeometryEffect(id:in:properties:anchor:isSource:)](swiftui/view/matchedgeometryeffect(id:in:properties:anchor:issource:).md)
- [matchedTransitionSource(id:in:)](swiftui/view/matchedtransitionsource(id:in:).md)
- [matchedTransitionSource(id:in:configuration:)](swiftui/view/matchedtransitionsource(id:in:configuration:).md)
- [phaseAnimator(_:content:animation:)](swiftui/view/phaseanimator(_:content:animation:).md)
- [phaseAnimator(_:trigger:content:animation:)](swiftui/view/phaseanimator(_:trigger:content:animation:).md)
- [transition(_:)](swiftui/view/transition(_:).md)
- [transaction(_:)](swiftui/view/transaction(_:).md)
- [transaction(value:_:)](swiftui/view/transaction(value:_:).md)
- [transaction(_:body:)](swiftui/view/transaction(_:body:).md)

## See Also

### Drawing views

- [Style modifiers](swiftui/view-style-modifiers.md)
- [Layout modifiers](swiftui/view-layout.md)
