(self, renderer)
| 447 | """ |
| 448 | |
| 449 | def _get_bbox_and_child_offsets(self, renderer): |
| 450 | # docstring inherited |
| 451 | dpicor = renderer.points_to_pixels(1.) |
| 452 | pad = self.pad * dpicor |
| 453 | sep = self.sep * dpicor |
| 454 | |
| 455 | if self.width is not None: |
| 456 | for c in self.get_visible_children(): |
| 457 | if isinstance(c, PackerBase) and c.mode == "expand": |
| 458 | c.set_width(self.width) |
| 459 | |
| 460 | bboxes = [c.get_bbox(renderer) for c in self.get_visible_children()] |
| 461 | (x0, x1), xoffsets = _get_aligned_offsets( |
| 462 | [bbox.intervalx for bbox in bboxes], self.width, self.align) |
| 463 | height, yoffsets = _get_packed_offsets( |
| 464 | [bbox.height for bbox in bboxes], self.height, sep, self.mode) |
| 465 | |
| 466 | yoffsets = height - (yoffsets + [bbox.y1 for bbox in bboxes]) |
| 467 | ydescent = yoffsets[0] |
| 468 | yoffsets = yoffsets - ydescent |
| 469 | |
| 470 | return ( |
| 471 | Bbox.from_bounds(x0, -ydescent, x1 - x0, height).padded(pad), |
| 472 | [*zip(xoffsets, yoffsets)]) |
| 473 | |
| 474 | |
| 475 | class HPacker(PackerBase): |
nothing calls this directly
no test coverage detected