Skip to content

epit3d/goclipper2

Repository files navigation

goclipper2

golang bindings for Clipper2 - a polygon Clipping and Offsetting library (originally in C++, C# & Delphi)

Documentation:

I would gladly refer you to original documentation by AngusJohnson and ask to search for similar names.

Usage

Get library:

go get github.com/epit3d/goclipper2

Simple code:

package main

import (
	"log"

	"github.com/epit3d/goclipper2/goclipper2"
)

func main() {
	p := goclipper2.NewPath64()

	p.AddPoint(*goclipper2.NewPoint64(0, 0))

	log.Println(p)
}
go run main.go

If you do this outside this repo, you should copy lib directory to the root of application.

For developer:

If you want to dig into how everything is building, go here

Contribution

Feel free to create an issue or PR with your thoughts.