Instance Method インスタンスメソッド

clip(to:style:options:)

Adds a path to the context’s array of clip shapes.

Declaration 宣言

mutating func clip(to path: Path, style: FillStyle = FillStyle(), options: GraphicsContext.ClipOptions = ClipOptions())

Parameters パラメータ

path

A Path that defines the shape of the clipping mask.

style

A FillStyle that defines how to rasterize the shape.

options

Clip options that tell SwiftUI how to interpret the path as a clip shape. For example, you can invert the clip shape by setting the inverse option.

Discussion 議論

Call this method to add a shape to the array of clip shapes that the context uses to define a clipping mask. Shapes that you add affect only subsequent drawing operations.

See Also 参照

Masking