Android graphics path with extended functionalities.
- Add the library to your project.
dependencies {
implementation("com.aureusapps.android:extended-path:1.0.3")
}-
Use the
ExtendedPathwrapper class.This wrapper class can be replaced by your
Pathclass. It records all the operations performed on thePathobject and the operations can be converted to a JSON string.
val path = ExtendedPath()
path.moveTo(0f, 0f)
path.lineTo(100f, 100f)
path.close()
val json = path.toJson()- Check path intersection
val path = ExtendedPath()
path.moveTo(0f, 0f)
path.lineTo(9f, 9f)
val doIntersect = path.doIntersect(3f, 3f)If you find this library useful, please consider buying me a coffee.