A Kotlin Multiplatform (jvm, js, native), based on Clipper2-java, a java v1.1.0 of Clipper2.
Later updated are following the C# changes of Clipper2
Added Clipper32 because Int performance is much better (1,5x - 10x) (with Kotlin) in JS
todo
The interface of Clipper2-kotlin-mpp is based on the original C# version/ java version. As JsExport constructor and method overloading is not supported JsNames were provided for these methods
The Clipper
class provides static methods for clipping, path-offsetting, minkowski-sums and path simplification.
For more complex clipping operations (e.g. when clipping open paths or when outputs are expected to include polygons nested within holes of others), use the Clipper64
or ClipperD
classes directly.
Clipper2KotlinMP is currently NOT available as Maven/Gradle artifact.
- this port is based on this java port: Clipper2-java , therefore I recomend to read their port infos first as
- Code passes all tests: polygon, line and polytree.
- Private And Public!! variables and methods have been renamed to their camelCase variant
scanlineList
fromClipperBase
used JavaTreeSet
. As this is not supported in MPP it was changed toMutableList
with custom sorting.