Parameters ---------- pad : float, optional Boundary pad. sep : float, optional Spacing between items. width : float, optional height : float, optional Width and height of the container box, calculated if
(self, pad=None, sep=None, width=None, height=None,
align=None, mode=None,
children=None)
| 272 | |
| 273 | class PackerBase(OffsetBox): |
| 274 | def __init__(self, pad=None, sep=None, width=None, height=None, |
| 275 | align=None, mode=None, |
| 276 | children=None): |
| 277 | """ |
| 278 | Parameters |
| 279 | ---------- |
| 280 | pad : float, optional |
| 281 | Boundary pad. |
| 282 | |
| 283 | sep : float, optional |
| 284 | Spacing between items. |
| 285 | |
| 286 | width : float, optional |
| 287 | |
| 288 | height : float, optional |
| 289 | Width and height of the container box, calculated if |
| 290 | `None`. |
| 291 | |
| 292 | align : str, optional |
| 293 | Alignment of boxes. Can be one of ``top``, ``bottom``, |
| 294 | ``left``, ``right``, ``center`` and ``baseline`` |
| 295 | |
| 296 | mode : str, optional |
| 297 | Packing mode. |
| 298 | |
| 299 | Notes |
| 300 | ----- |
| 301 | *pad* and *sep* need to given in points and will be scale with |
| 302 | the renderer dpi, while *width* and *height* need to be in |
| 303 | pixels. |
| 304 | """ |
| 305 | super().__init__() |
| 306 | |
| 307 | self.height = height |
| 308 | self.width = width |
| 309 | self.sep = sep |
| 310 | self.pad = pad |
| 311 | self.mode = mode |
| 312 | self.align = align |
| 313 | |
| 314 | self._children = children |
| 315 | |
| 316 | |
| 317 | class VPacker(PackerBase): |