Instance Method


Composites this view’s contents into an offscreen image before final display.


func drawingGroup(opaque: Bool = false, colorMode: ColorRenderingMode = .nonLinear) -> some View



A Boolean value that indicates whether the image is opaque. If true, the alpha channel of the image must be one.


The working color space and storage format of the image.

Return Value

A view that composites this view’s contents into an offscreen image before display.


Views backed by native platform views don’t render into the image. Instead, they log a warning and display a placeholder image to highlight the error.

See Also

Applying Graphical Effects to a View

func opacity(Double) -> View

Sets the transparency of this view.

func brightness(Double) -> View

Brightens this view by the specified amount.

func contrast(Double) -> View

Sets the contrast and separation between similar colors in this view.

func colorInvert() -> View

Inverts the colors in this view.

func colorMultiply(Color) -> View

Adds a color multiplication effect to this view.

func blendMode(BlendMode) -> View

Sets the blend mode for compositing this view with overlapping views.

func compositingGroup() -> View

Wraps this view in a compositing group.

func saturation(Double) -> View

Adjusts the color saturation of this view.

func grayscale(Double) -> View

Adds a grayscale effect to this view.

func hueRotation(Angle) -> View

Applies a hue rotation effect to this view.

func luminanceToAlpha() -> View

Adds a luminance to alpha effect to this view.