Stylianos Gakis
09/19/2022, 9:56 PMSurface
clips by default by the Shape
passed into it. Plus there doesn’t seem to be any Surface which provides flexibility there. Is there some specific reason why that is the case?
My use case is that I am rotating something inside a Surface (to get proper contentColor) and I am rotating that item in there meaning that while it’s at for example 45° the corners get clipped.
I guess I can make my own surface overload, but curious to see if I am missing some API and if not what the reason is for Surface
to always clip.Stylianos Gakis
09/19/2022, 10:03 PMSurface(shape = infinitelyBigShape, ...)
---
private val infinitelyBigShape = object : Shape {
override fun createOutline(size: Size, layoutDirection: LayoutDirection, density: Density): Outline {
return Outline.Rectangle(Rect(Offset.Zero, Float.MAX_VALUE))
}
}
But I wonder if I got good reasons not to do that 👀