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

clipped(antialiased:)

Clips this view to its bounding rectangular frame. このbkビューをそれの境界矩形枠に切り抜きます。

Declaration 宣言

func clipped(antialiased: Bool = false) -> some View

Return Value 戻り値

A view that clips this view to its bounding frame. あるビュー、それはこのビューをそれの境界枠に切り抜いたものです。

Parameters パラメータ

antialiased

A Boolean value that indicates whether the rendering system applies smoothing to the edges of the clipping rectangle. あるブール値、それは滑らかさが切り抜き矩形の縁に適用されるかどうかを指し示します。

Discussion 議論

Use the clipped(antialiased:) modifier to hide any content that extends beyond the layout bounds of the shape. clipped(antialiased:)修飾子を使って、その形状のレイアウト境界を越えて広がるあらゆる内容を隠してください。

By default, a view’s bounding frame is used only for layout, so any content that extends beyond the edges of the frame is still visible. 初期状態では、ビューのもつ境界枠はレイアウトに対してのみ使われます、それでその枠の縁を越えて広がるあらゆる内容は、依然として可視です。


Text("This long text string is clipped")
    .fixedSize()
    .frame(width: 175, height: 100)
    .clipped()
    .border(Color.gray)

Screenshot showing text clipped to its