Hey guys. I faced a weird buggy behaviour of Compo...
# compose
a
Hey guys. I faced a weird buggy behaviour of Compose
Path
operations. More in 🧵.
I try to create a combined path (for example donut) using path operations.
Copy code
val bigCircle = Path().apply {
    addOval(Rect(0f, 0f, 100f, 100f))
}

val smallCircle = Path().apply {
    addOval(Rect(30f, 30f, 70f, 70f))
}

val donut = Path.combine(PathOperation.Xor, bigCircle, smallCircle)

drawPath(donut, Color.Black)
And this do the job:
But when i do the same but add a
donut
path using
addPath
to other path like this:
Copy code
val donutWithSomethingElse = Path().apply {
    addPath(donut)
}

drawPath(donutWithSomethingElse, Color.Black)
I am getting this:
Previously i used to do the same with
android.graphics.Path
and it worked like a charm. And when i started to migrate the code to Compose i faced this issue
Should i fill up an issue report or am i doing something wrong?
e
fill type is set by combine but can't be by addPath
if you flip the winding order of one of the circles it should work
thank you color 1