polylabel 1.0.1 copy "polylabel: ^1.0.1" to clipboard
polylabel: ^1.0.1 copied to clipboard

A fast algorithm for finding polygon pole of inaccessibility implemented as a Dart library. Useful for optimal placement of a text label on a polygon.

example/polylabel_example.dart

import 'dart:math';

import 'package:polylabel/polylabel.dart';

void main() {
  final polygon = [
    [Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1), Point(0, 0)]
  ];
  final result = polylabel(polygon);
  print(result); // PolylabelResult(Point(0.5, 0.5), distance: 0.5)
}
9
likes
140
pub points
90%
popularity

Publisher

verified publisherberoso.dev

A fast algorithm for finding polygon pole of inaccessibility implemented as a Dart library. Useful for optimal placement of a text label on a polygon.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

collection

More

Packages that depend on polylabel