Return the offset as a tuple (x, y). The extent parameters have to be provided to handle the case where the offset is dynamically determined by a callable (see `~.OffsetBox.set_offset`). Parameters ---------- bbox : `.Bbox` renderer
(self, bbox, renderer)
| 290 | |
| 291 | @_compat_get_offset |
| 292 | def get_offset(self, bbox, renderer): |
| 293 | """ |
| 294 | Return the offset as a tuple (x, y). |
| 295 | |
| 296 | The extent parameters have to be provided to handle the case where the |
| 297 | offset is dynamically determined by a callable (see |
| 298 | `~.OffsetBox.set_offset`). |
| 299 | |
| 300 | Parameters |
| 301 | ---------- |
| 302 | bbox : `.Bbox` |
| 303 | renderer : `.RendererBase` subclass |
| 304 | """ |
| 305 | return ( |
| 306 | self._offset(bbox.width, bbox.height, -bbox.x0, -bbox.y0, renderer) |
| 307 | if callable(self._offset) |
| 308 | else self._offset) |
| 309 | |
| 310 | def set_width(self, width): |
| 311 | """ |
no test coverage detected