Zach Klippenstein (he/him) [MOD]
02/07/2020, 1:47 AMClip
isn’t doing anything. I can implement DrawModifier
and manually clip the canvas before drawing the children, and that works, but Clip
doesn’t seem to have any effect whatsoever. Is this a known issue?Andrey Kulikov
02/07/2020, 3:56 PMClip
definitely works, at least for our cases. we clip Surfaces and Buttons with them. it is possible it works not as you expect in the moment in combination with some LayoutModifiers, which is expected. could you please share your code?Zach Klippenstein (he/him) [MOD]
02/07/2020, 7:02 PMZach Klippenstein (he/him) [MOD]
02/07/2020, 7:03 PMAndrey Kulikov
02/10/2020, 12:02 PMDrawShape(shape = RoundedCornerShape(thickness), color = Color.Cyan)
on the same level as Clip in your code and it clips, but using the size of Center component, not Box, that why the effect is not visible. To fix this right now you can wrap your Clip component inside "Wrap" layout, and this will do the trick. In the future we expect Clip will be done as a modifier and you will do something like modifier = Clip(RoundedCornerShape(thickness)) + PictureFrameModifier(thickness, colors, cache)
, but not right nowZach Klippenstein (he/him) [MOD]
02/10/2020, 4:21 PM