1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-booleanOperations
5 KEYWORDS= python devel graphics
7 SDESC[py37]= Boolean operations on paths (PY 37)
8 SDESC[py38]= Boolean operations on paths (PY 38)
9 HOMEPAGE= https://github.com/typemytype/booleanOperations
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPI/b/booleanOperations
14 DISTFILE[1]= booleanOperations-0.9.0.zip:main
19 OPTIONS_AVAILABLE= PY38 PY37
20 OPTIONS_STANDARD= none
21 VOPTS[py37]= PY38=OFF PY37=ON
22 VOPTS[py38]= PY38=ON PY37=OFF
24 BUILDRUN_DEPENDS= python-wheel:single:python_used
25 python-setuptools_scm:single:python_used
27 DISTNAME= booleanOperations-0.9.0
31 [PY37].USES_ON= python:py37
33 [PY38].USES_ON= python:py38
35 [FILE:2602:descriptions/desc.single]
36 |Build Status| |PyPI| |Python Versions|
41 Boolean operations on paths which uses a super fast `polygon clipper
42 library by Angus Johnson <http://www.angusj.com/delphi/clipper.php>`__.
44 You can download the latest version from PyPI:
46 https://pypi.org/project/booleanOperations.
51 `Pip <https://pip.pypa.io/en/stable/>`__ is the recommended tool to
52 install booleanOperations.
54 To install the latest version:
58 pip install booleanOperations
60 BooleanOperations depends on the following packages:
62 - `pyclipper <https://pypi.org/project/pyclipper/>`__: Cython wrapper for
63 the C++ Clipper library
64 - `fonttools <github.com/behdad/fonttools>`__
66 All dependencies are available on PyPI, so they will be resolved
67 automatically upon installing booleanOperations.
69 BooleanOperationManager
70 -----------------------
72 Containing a ``BooleanOperationManager`` handling all boolean operations
73 on paths. Paths must be similar to ``defcon``, ``robofab`` contours. A
74 manager draws the result in a ``pointPen``.
78 from booleanOperations import BooleanOperationManager
80 manager = BooleanOperationManager()
82 BooleanOperationManager()
83 ~~~~~~~~~~~~~~~~~~~~~~~~~
85 Create a ``BooleanOperationManager``.
87 manager.union(contours, pointPen)
88 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90 Performs a union on all ``contours`` and draw it in the ``pointPen``.
91 (this is a what a remove overlaps does)
93 manager.difference(contours, clipContours, pointPen)
94 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96 Knock out the ``clipContours`` from the ``contours`` and draw it in the
99 manager.intersection(contours, clipContours, pointPen)
100 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102 Draw only the overlaps from the ``contours`` with the
103 ``clipContours``\ and draw it in the ``pointPen``.
105 manager.xor(contours, clipContours, pointPen)
106 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108 Draw only the parts that not overlaps from the ``contours`` with the
109 ``clipContours``\ and draw it in the ``pointPen``.
111 manager.getIntersections(contours)
112 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114 Returning all intersection for the given contours
119 A glyph like object with boolean powers.
123 from booleanOperations.booleanGlyph import BooleanGlyph
125 booleanGlyph = BooleanGlyph(sourceGlyph)
127 BooleanGlyph(sourceGlyph)
128 ~~~~~~~~~~~~~~~~~~~~~~~~~
130 Create a ``BooleanGlyph`` object from ``sourceGlyph``. This is a very
131 shallow glyph object with basic support.
133 booleanGlyph.union(other)
134 ^^^^^^^^^^^^^^^^^^^^^^^^^
139 8cfa821c32ad374fa120d6b2e0b444ebeac57c91e6631528645fa19ac2a281b8 202950 booleanOperations-0.9.0.zip