I am altering a
Shape
object by having an extension function like
private fun Shape.alter(someInput): Shape
, where the impl assumes that it's a Outline.generic so that I can grab its
Path
and combine it with another.
return object : Shape {
override fun createOutline(size: Size, layoutDirection: LayoutDirection, density: Density): Outline {
val outline = this@alter.createOutline(size, layoutDirection, density)
val path: Path = (outline as Outline.Generic).path
val extraPath = Path()...
return Outline.Generic(Path.combine(PathOperation.Union, extraPath, path))
}
}
Now I want to be able to support also Outline.Rounded but I can't seem to find the right API to achieve this, if there is one. Any ideas?