A node with a physical location.
| 1145 | |
| 1146 | |
| 1147 | class Box(Node): |
| 1148 | """A node with a physical location.""" |
| 1149 | |
| 1150 | def __init__(self, width: float, height: float, depth: float) -> None: |
| 1151 | super().__init__() |
| 1152 | self.width = width |
| 1153 | self.height = height |
| 1154 | self.depth = depth |
| 1155 | |
| 1156 | def shrink(self) -> None: |
| 1157 | super().shrink() |
| 1158 | if self.size < NUM_SIZE_LEVELS: |
| 1159 | self.width *= SHRINK_FACTOR |
| 1160 | self.height *= SHRINK_FACTOR |
| 1161 | self.depth *= SHRINK_FACTOR |
| 1162 | |
| 1163 | def render(self, output: Output, # type: ignore[override] |
| 1164 | x1: float, y1: float, x2: float, y2: float) -> None: |
| 1165 | pass |
| 1166 | |
| 1167 | |
| 1168 | class Vbox(Box): |
no outgoing calls
no test coverage detected