# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-pyclipper VERSION= 1.4.0 KEYWORDS= python VARIANTS= v13 v14 SDESC[v13]= Cython wrapper for the AJ Clipper library (3.13) SDESC[v14]= Cython wrapper for the AJ Clipper library (3.14) HOMEPAGE= https://github.com/fonttools/pyclipper CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPI/p/pyclipper DISTFILE[1]= pyclipper-1.4.0.tar.gz:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v13]= single SPKGS[v14]= single OPTIONS_AVAILABLE= PY313 PY314 OPTIONS_STANDARD= none VOPTS[v13]= PY313=ON PY314=OFF VOPTS[v14]= PY313=OFF PY314=ON USES= c++:single DISTNAME= pyclipper-1.4.0 GENERATED= yes [PY313].BUILD_DEPENDS_ON= python-setuptools-scm:single:v13 python-Cython:single:v13 [PY313].USES_ON= python:v13,pep517 [PY314].BUILD_DEPENDS_ON= python-setuptools-scm:single:v14 python-Cython:single:v14 [PY314].USES_ON= python:v14,pep517 [FILE:2586:descriptions/desc.single] About ===== Pyclipper is a Cython wrapper exposing public functions and classes of the C++ translation of the `Angus Johnson's Clipper library (ver. 6.4.2) `__. Source code is available on [GitHub]. The package is published on [PyPI]. About Clipper ------------- Clipper - an open source freeware library for clipping and offsetting lines and polygons. The Clipper library performs line & polygon clipping - intersection, union, difference & exclusive-or, and line & polygon offsetting. The library is based on Vatti's clipping algorithm. \ [Angus Johnson's Clipper library]\ Install ======= From PyPI --------- :: pip install pyclipper From source ----------- Clone the repository: :: git clone git@github.com:fonttools/pyclipper.git Install: :: pip install . For development, use an editable install: :: pip install -e . Clippers' preprocessor directives --------------------------------- Clipper can be compiled with the following preprocessor directives: use_int32, use_xyz, use_lines and use_deprecated. Among these the use_int32 and use_lines can be used with Pyclipper. - use_int32 - when enabled 32bit ints are used instead of 64bit ints. This improve performance but coordinate values are limited to the range +/- 46340. In Pyclipper this directive is **disabled** by default. - use_lines - enables line clipping. Adds a very minor cost to performance. In Pyclipper this directive is **enabled** by default (since version 0.9.2b0). In case you would want to change these settings, clone this repository and change the define_macros collection (``setup.py``, pyclipper extension definition). Add a set like ``('use_int32', 1)`` to enable the directive, or remove the set to disable it. After that you need to rebuild the package. How to use ========== This wrapper library tries to follow naming conventions of the original library. - ClipperLib namespace is represented by the pyclipper module, - classes Clipper and ClipperOffset -> Pyclipper and PyclipperOffset, - when Clipper is overloading functions with different number of parameters or different types (eg. ``Clipper.Execute``, one function fills a list of paths the other PolyTree) that becomes ``Pyclipper.Execute and Pyclipper.Execute2``. Basic clipping example (based on [Angus Johnson's Clipper library]): .. code:: python import pyclipper subj = ( ((180, 200), (260, 200), (260, 150), (180, 150)), [FILE:112:distinfo] 9882bd889f27da78add4dd6f881d25697efc740bf840274e749988d25496c8e1 54489 python-src/pyclipper-1.4.0.tar.gz