/usr/share/doc/python-pyx-doc/manual/_sources/bbox.txt is in python-pyx-doc 0.12.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | .. _bbox_module:
.. module:: bbox
******************
Module :mod:`bbox`
******************
The :mod:`bbox`` module contains the definition of the :class:`bbox` class representing
bounding boxes of graphical elements like paths, canvases, etc. used in PyX.
Usually, you obtain ``bbox`` instances as return values of the corresponding
``bbox())`` method, but you may also construct a bounding box by yourself.
:class:`bbox` constructor
=========================
The ``bbox`` constructor accepts the following keyword arguments
+---------+-----------------------------------------------+
| keyword | description |
+=========+===============================================+
| ``llx`` | ``None`` (default) for :math:`-\infty` or |
| | :math:`x`\ -position of the lower left corner |
| | of the bbox (in user units) |
+---------+-----------------------------------------------+
| ``lly`` | ``None`` (default) for :math:`-\infty` or |
| | :math:`y`\ -position of the lower left corner |
| | of the bbox (in user units) |
+---------+-----------------------------------------------+
| ``urx`` | ``None`` (default) for :math:`\infty` or |
| | :math:`x`\ -position of the upper right |
| | corner of the bbox (in user units) |
+---------+-----------------------------------------------+
| ``ury`` | ``None`` (default) for :math:`\infty` or |
| | :math:`y`\ -position of the upper right |
| | corner of the bbox (in user units) |
+---------+-----------------------------------------------+
:class:`bbox` methods
=====================
+-------------------------------------------+-----------------------------------------------+
| ``bbox`` method | function |
+===========================================+===============================================+
| ``intersects(other)`` | returns ``1`` if the ``bbox`` instance and |
| | ``other`` intersect with each other. |
+-------------------------------------------+-----------------------------------------------+
| ``transformed(self, trafo)`` | returns ``self`` transformed by |
| | transformation ``trafo``. |
+-------------------------------------------+-----------------------------------------------+
| ``enlarged(all=0, bottom=None, left=None, | return the bounding box enlarged by the given |
| top=None, right=None)`` | amount (in visual units). ``all`` is the |
| | default for all other directions, which is |
| | used whenever ``None`` is given for the |
| | corresponding direction. |
+-------------------------------------------+-----------------------------------------------+
| ``path()`` or ``rect()`` | return the ``path`` corresponding to the |
| | bounding box rectangle. |
+-------------------------------------------+-----------------------------------------------+
| ``height()`` | returns the height of the bounding box (in |
| | PyX lengths). |
+-------------------------------------------+-----------------------------------------------+
| ``width()`` | returns the width of the bounding box (in PyX |
| | lengths). |
+-------------------------------------------+-----------------------------------------------+
| ``top()`` | returns the :math:`y`\ -position of the top |
| | of the bounding box (in PyX lengths). |
+-------------------------------------------+-----------------------------------------------+
| ``bottom()`` | returns the :math:`y`\ -position of the |
| | bottom of the bounding box (in PyX lengths). |
+-------------------------------------------+-----------------------------------------------+
| ``left()`` | returns the :math:`x`\ -position of the left |
| | side of the bounding box (in PyX lengths). |
+-------------------------------------------+-----------------------------------------------+
| ``right()`` | returns the :math:`x`\ -position of the right |
| | side of the bounding box (in PyX lengths). |
+-------------------------------------------+-----------------------------------------------+
Furthermore, two bounding boxes can be added (giving the bounding box enclosing
both) and multiplied (giving the intersection of both bounding boxes).
|