5 The
\texttt{bbox
} module contains the definition of the
\texttt{bbox
}
6 class representing bounding boxes of graphical elements like paths,
7 canvases, etc.\ used in
\PyX. Usually, you obtain
\texttt{bbox
}
8 instances as return values of the corresponding
\texttt{bbox())
}
9 method, but you may also construct a bounding box by yourself.
11 \section{bbox constructor
}
13 The
\texttt{bbox
} constructor accepts the following keyword arguments
15 \begin{tableii
}{l|l
}{textrm
}{keyword
}{description
}
16 \lineii{\texttt{llx
}}{\texttt{None
} (default) for $-
\infty$ or $x$-position of the lower left corner of the bbox (in user units)
}
17 \lineii{\texttt{lly
}}{\texttt{None
} (default) for $-
\infty$ or $y$-position of the lower left corner of the bbox (in user units)
}
18 \lineii{\texttt{urx
}}{\texttt{None
} (default) for $
\infty$ or $x$-position of the upper right corner of the bbox (in user units)
}
19 \lineii{\texttt{ury
}}{\texttt{None
} (default) for $
\infty$ or $y$-position of the upper right corner of the bbox (in user units)
}
22 \section{bbox methods
}
24 \begin{tableii
}{l|l
}{textrm
}{\texttt{bbox
} method
}{function
}
25 \lineii{\texttt{intersects(other)
}}{returns
\texttt{1} if the
\texttt{bbox
} instance and
\texttt{other
} intersect with each other.
}
26 \lineii{\texttt{transformed(self, trafo)
}}{returns
\texttt{self
} transformed by transformation
\texttt{trafo
}.
}
27 \lineii{\texttt{enlarged(all=
0, bottom=None, left=None, top=None, right=None)
}}{return the bounding box enlarged by the given amount (in visual units).
\texttt{all
} is the default for all other directions, which is used whenever
\texttt{None
} is given for the corresponding direction.
}
28 \lineii{\texttt{path()
} or
\texttt{rect()
}}{return the
\texttt{path
} corresponding to the bounding box rectangle.
}
29 \lineii{\texttt{height()
}}{returns the height of the bounding box (in
\PyX{} lengths).
}
30 \lineii{\texttt{width()
}}{returns the width of the bounding box (in
\PyX{} lengths).
}
31 \lineii{\texttt{top()
}}{returns the $y$-position of the top of the bounding box (in
\PyX{} lengths).
}
32 \lineii{\texttt{bottom()
}}{returns the $y$-position of the bottom of the bounding box (in
\PyX{} lengths).
}
33 \lineii{\texttt{left()
}}{returns the $x$-position of the left side of the bounding box (in
\PyX{} lengths).
}
34 \lineii{\texttt{right()
}}{returns the $x$-position of the right side of the bounding box (in
\PyX{} lengths).
}
37 Furthermore, two bounding boxes can be added (giving the bounding box
38 enclosing both) and multiplied (giving the intersection of both
43 %%% TeX-master: "manual.tex"