Alexander Zhirkevich
10/01/2023, 9:11 PMPath
operations. More in 🧵.Alexander Zhirkevich
10/01/2023, 9:11 PMval 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)
Alexander Zhirkevich
10/01/2023, 9:12 PMAlexander Zhirkevich
10/01/2023, 9:12 PMdonut
path using addPath
to other path like this:
val donutWithSomethingElse = Path().apply {
addPath(donut)
}
drawPath(donutWithSomethingElse, Color.Black)
Alexander Zhirkevich
10/01/2023, 9:12 PMAlexander Zhirkevich
10/01/2023, 9:13 PMandroid.graphics.Path
and it worked like a charm.
And when i started to migrate the code to Compose i faced this issueAlexander Zhirkevich
10/01/2023, 9:27 PMephemient
10/01/2023, 10:29 PMephemient
10/01/2023, 10:30 PM