Return a copy of the `Bbox` anchored to *c* within *container*. Parameters ---------- c : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} Either an (*x*, *y*) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C'
(self, c, container)
| 501 | 'W': (0, 0.5)} |
| 502 | |
| 503 | def anchored(self, c, container): |
| 504 | """ |
| 505 | Return a copy of the `Bbox` anchored to *c* within *container*. |
| 506 | |
| 507 | Parameters |
| 508 | ---------- |
| 509 | c : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} |
| 510 | Either an (*x*, *y*) pair of relative coordinates (0 is left or |
| 511 | bottom, 1 is right or top), 'C' (center), or a cardinal direction |
| 512 | ('SW', southwest, is bottom left, etc.). |
| 513 | container : `Bbox` |
| 514 | The box within which the `Bbox` is positioned. |
| 515 | |
| 516 | See Also |
| 517 | -------- |
| 518 | .Axes.set_anchor |
| 519 | """ |
| 520 | l, b, w, h = container.bounds |
| 521 | L, B, W, H = self.bounds |
| 522 | cx, cy = self.coefs[c] if isinstance(c, str) else c |
| 523 | return Bbox(self._points + |
| 524 | [(l + cx * (w - W)) - L, |
| 525 | (b + cy * (h - H)) - B]) |
| 526 | |
| 527 | def shrunk(self, mx, my): |
| 528 | """ |
no test coverage detected