Skip to main content

Clipped

Clips this component to its bounding frame.

modifier Clipped
import { Clipped, Image, Frame } from ui

// load an image larger than 50x50
export var main = Image("my_image.png") with {
Frame(width: 50, height: 50)
Clipped() // the image is clipped to the frame size
}

Constructor

(_ clip)

_ clip: Bool = true

Whether or not the component should clip.

Layout Behavior

None.