FLUTTER ECOSYSTEM

beroso/dart_polylabel

Porta Dart do https://github.com/mapbox/polylabel

Capa do projeto dart_polylabel
Stars
8
Forks
5
Último push (UTC)
6 de set. de 2023
Status do projeto
Ativo
André Sousa GitHub avatar
GITHUB User

André Sousa ↗

BeropixelCeará, BrasilSite oficial ↗
LinguagensDart

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 3 itens

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher README

polylabel

build pub package pub points popularity likes

Dart port of https://github.com/mapbox/polylabel.

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.

Usage

import 'dart:math';

import 'package:polylabel/polylabel.dart';

final polygon = [[Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1), Point(0, 0)]];
final result = polylabel(polygon); // PolylabelResult(Point(0.5, 0.5), distance: 0.5)