I just figured that `Surface` clips by default by ...
# compose
s
I just figured that
Surface
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.
Hmm, I “beat” that limitation by passing in a shape which is infinitely big like this:
Copy code
Surface(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 👀