Instance Method

drawingGroup(opaque:colorMode:)

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

Declaration

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

Parameters

opaque

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

colorMode

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.

Discussion

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

Compositing Views

func blendMode(BlendMode) -> View

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

func compositingGroup() -> View

Wraps the view in a compositing group.