Hey everyone, I want to add a border around a cust...
# compose-android
c
Hey everyone, I want to add a border around a custom shape, unknown ,basically a image loaded from XML or a bunch of composables inside a Box
z
You can pass a
Shape
to the border modifier, and make a custom shape for whatever you need.
r
The problem is when the shape is unknown. I have a library that can help for that. If you have a Bitmap it can compute a Path representing the outline
That’s how I flow text around these images for instance:

https://github.com/romainguy/combo-breaker/blob/main/art/screenshot_arbitrary_shapes.png

c
That’s awesome, thanks. Is there a way we can do that with a composable función? (an image and a text)
r
You'll have to render the composable to a bitmap first
🙌 1
j
@romainguy How do you determine the outline of a bitmap? Any sources or references you can share to explain what’s happening?
130 Views