Skip to main content

No project description provided

Project description

linesweeper

Python bindings for linesweeper, a Rust library for 2D boolean path operations.

Provides a union() function compatible with ufo2ft's overlap removal filter, as a drop-in replacement for skia-pathops.

Install

Requires Rust toolchain and maturin:

pip install maturin
maturin develop

Usage

from linesweeper import union

# contours: list of objects with a .draw(pen) method (e.g. defcon contours)
# outpen: a fontTools segment pen (moveTo/lineTo/curveTo/closePath)
union(contours, outpen, clockwise=True)

API

  • union(contours, outpen, clockwise=False) — merge overlapping contours using nonzero winding fill rule

Set clockwise=True for font convention (outer contours clockwise, holes counter-clockwise).

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linesweeper-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linesweeper-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (365.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file linesweeper-0.1.0.tar.gz.

File metadata

  • Download URL: linesweeper-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.2

File hashes

Hashes for linesweeper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 676a5d8d6e53b05eb3ad85bee794d493037cf1ad6608da2d536da857b5520e17
MD5 bfa0aac2e34034b06107fb046c424be0
BLAKE2b-256 b4908cfb64448c2671a209967ff57c38b3ce57bc356101f7ef77bc801c61362d

See more details on using hashes here.

File details

Details for the file linesweeper-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for linesweeper-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7519a643aea14aa8b5cc86468c7874f6f02b0a47a6eabca0616b290caf99c90
MD5 8f580b31d8f5852dfea56d3f8720eb08
BLAKE2b-256 4d07c3894e0b516ff377d1d967ca8009687029d3f3d168d5460fab13de3856fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page