Android graphics path with extended functionalities.
- Add the library to your project.
dependencies {
implementation("com.aureusapps.android:extended-path:1.0.0")
}
-
Use the
ExtendedPath
wrapper class.This wrapper class can be replaced by your
Path
class. It records all the operations performed on thePath
object 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.