clipper2 0.0.1 copy "clipper2: ^0.0.1" to clipboard
clipper2: ^0.0.1 copied to clipboard

A Polygon Clipping and Offsetting library

clipper2-dart #

A Polygon Clipping and Offsetting library in Dart
#

This is a Dart (Flutter) port of Angus Johnson's excellent Clipper2 library originally available for C++, C# and Delphi. The port uses the C# code as reference.

The library compiles on all platforms (mobile, desktop and web). When compiling for the web, the precision is restricted, as there are no 64-bit integers available.

The Clipper2 library performs intersection, union, difference and XOR boolean operations on both simple and complex polygons. It also performs polygon offsetting. This is a major update of my original Clipper library that was written over 10 years ago. That library I'm now calling Clipper1, and while it still works very well, Clipper2 is better in just about every way.

Documentation #

The original GitHub repository
Extensive HTML documentation

Examples #

The example subdirectory contains a Flutter app that demonstrates the functions of the library.

import 'package:clipper2/clipper2.dart';

  final subject = Path64Ext.from([100, 50, 10, 79, 65, 2, 65, 98, 10, 21]);
  final clip = Path64Ext.from[98, 63, 4, 68, 77, 8, 52, 100, 19, 12]);
  solution = Clipper.intersect(
    subject: subject, 
    clip: clip, 
    fillRule: FillRule.nonZero,
  );

clipperB

3
likes
0
points
1.31k
downloads

Publisher

verified publishernatlink.fi

Weekly Downloads

A Polygon Clipping and Offsetting library

Repository

License

unknown (license)

Dependencies

collection

More

Packages that depend on clipper2