Is it possible to clip a composable into a shape, ...
# compose
z
Is it possible to clip a composable into a shape, but still enable its children to draw outside the borders of the composable? For example - have a Box clipped to a rounded corners rect, but still let the children of the Box to draw outside the Box's borders. The
clip
modifier will do exactly this - clip the composable and its children, but I was wondering if there's a way to tell a child composable not to be clipped. I'm making a color picker and the circle indicating the current color is clipped.
r
Move whatever content you want clipped to a child and clip only there.
1
z
Yeah, that's what I did. I asked the question in case I was missing some API in Compose that would help 🙂 Thanks!