https://kotlinlang.org logo
m

Mikołaj Kąkol

02/08/2021, 10:54 AM
hi, can I draw outside box bounds? something smiliar to xml’s
clipToPadding=false
?
using size instead of prefred size seams to work
t

Timo Drick

02/08/2021, 1:37 PM
There is a similar modifier clipToBounds() or clip(shape). Some composables do use it. So it depends. Box do not clipToBounds so it is possible to draw outside of the bounds.
c

Colton Idle

02/08/2021, 8:37 PM
Compose doesn't clip children by default IIRC
n

Nader Jawad

02/08/2021, 9:55 PM
Yes compose does not clip any content by default so there is no need to explicitly disable clipping like the framework operates today. You should be able to draw outside the bounds and content should be rendered as expected