v1.0.1
polylabel
一種快速演算法,用於尋找多邊形的不可達中心點,以 Dart 庫的形式實現。對於在多邊形上最佳放置文字標籤非常有用。
10喜歡 36.8萬近 30 天下載160Pub 分數
AndroidiOSWebmacOSWindowsLinux
Dart 版本的 https://github.com/mapbox/polylabel
以下為英文專案原文快照,最新內容請造訪 GitHub。
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.
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)
依賴清單 3 項
^1.15.0^1.0.0^1.16.0先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗