Skip to content

Polygon Clipping and Offsetting - C++, C# and Delphi

License

Notifications You must be signed in to change notification settings

czq1989/Clipper2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clipper2

A Polygon Clipping and Offsetting library (in C++, C# & Delphi)

GitHub Actions C++ status C# License

Clipper2 is a major update of my original Clipper library which I'm now calling Clipper1.
Clipper1 was written over 10 years ago and still works very well, but Clipper2 is better in just about every way.

Documentation

Extensive HTML documentation

Examples

      //C++
      Paths64 subject, clip, solution;
      subject.push_back(MakePath("100, 50, 10, 79, 65, 2, 65, 98, 10, 21"));
      clip.push_back(MakePath("98, 63, 4, 68, 77, 8, 52, 100, 19, 12"));
      solution = Intersect(subject, clip, FillRule::NonZero);
      //C#
      Paths64 subj = new Paths64();
      Paths64 clip = new Paths64();
      subj.Add(Clipper.MakePath(new int[] { 100, 50, 10, 79, 65, 2, 65, 98, 10, 21 }));
      clip.Add(Clipper.MakePath(new int[] { 98, 63, 4, 68, 77, 8, 52, 100, 19, 12 }));
      Paths64 solution = Clipper.Intersect(subj, clip, FillRule.NonZero);
      //Delphi
      var 
        subject, clip, solution: TPaths64;
      begin
        SetLength(subject, 1);
        subject[0] := MakePath([100, 50, 10, 79, 65, 2, 65, 98, 10, 21]);
        SetLength(clip, 1);
        clip[0] := MakePath([98, 63, 4, 68, 77, 8, 52, 100, 19, 12]);
        solution := Intersect( subject, clip, frNonZero);

clipperB

About

Polygon Clipping and Offsetting - C++, C# and Delphi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Pascal 36.3%
  • C++ 32.7%
  • C# 30.3%
  • CMake 0.7%