Jeisson Sáchica
10/22/2020, 5:40 PM@Stable
val EmptyRectangleShape: Shape = object: Shape {
override fun createOutline(size: Size, density: Density): Outline =
Outline.Rectangle(Rect.Zero)
}
Leland Richardson [G]
10/22/2020, 5:44 PMJeisson Sáchica
10/22/2020, 5:52 PMAndrey Kulikov
10/22/2020, 6:07 PMLeland Richardson [G]
10/22/2020, 6:08 PMclipRect(0f,0f,0f,0f) { drawContent() }
it works as you’d expectAndrey Kulikov
10/22/2020, 6:12 PMreturn if (!outlineNeeded || cachedOutline.isEmpty) null else cachedOutline
and isEmpty is true when you pass empty rectJeisson Sáchica
10/22/2020, 7:05 PM