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

The clipper2 library performs intersection, union, difference and xor boolean operations on both simple and complex polygons. It also performs polygon offsetting.

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 the original Clipper library that was written over 10 years ago. That library now called 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

0
likes
160
points
437
downloads

Publisher

verified publishernatlink.fi

Weekly Downloads

The clipper2 library performs intersection, union, difference and xor boolean operations on both simple and complex polygons. It also performs polygon offsetting.

Repository

Documentation

API reference

License

BSL-1.0 (license)

Dependencies

collection

More

Packages that depend on clipper2