Back to Filament

setScissor

docs/android/dokka/filament-android/com.google.android.filament/-material-instance/set-scissor.md

1.75.01.3 KB
Original Source

//filament-android/com.google.android.filament/MaterialInstance/setScissor

setScissor

[main]
open fun setScissor(left: Int, bottom: Int, width: Int, height: Int)

Set-up a custom scissor rectangle; by default it is disabled.

The scissor rectangle gets clipped by the View's viewport, in other words, the scissor cannot affect fragments outside of the View's Viewport.

Currently the scissor is not compatible with dynamic resolution and should always be disabled when dynamic resolution is used.

Parameters

main

leftleft coordinate of the scissor box relative to the viewport
bottombottom coordinate of the scissor box relative to the viewport
widthwidth of the scissor box
heightheight of the scissor box

See also

unsetScissor
View