GraphicsContextClipOptions

Options that affect the use of clip shapes.

StructureiOS 15.0+macOS 12.0+tvOS 15.0+watchOS 8.0+GraphicsContext.ClipOptions in SwiftUI

Declaration

React
type GraphicsContextClipOptions =
  | ('inverse'
  | { rawValue: number; })
  | readonly ('inverse'
  | { rawValue: number; })[];
Swift
@frozen struct ClipOptions

Pass a literal, or build one with SwiftUI.GraphicsContextClipOptions from import { SwiftUI } from 'swiftui-react-native'.

Overview

Use these options to affect how SwiftUI interprets a clip shape when you call clip(to:style:options:) to add a path to the array of clip shapes, or when you call clipToLayer(opacity:options:content:) to add a clipping layer.

From Apple’s SwiftUI documentation. Code samples there are Swift.

See also

More in Drawing and shapes.