Return the (x, y) position of the *bbox* anchored at the *parentbbox* with the *loc* code with the *borderpad* and padding *pad_x*, *pad_y*.
(loc, bbox, parentbbox, pad_x, pad_y)
| 1101 | |
| 1102 | |
| 1103 | def _get_anchored_bbox(loc, bbox, parentbbox, pad_x, pad_y): |
| 1104 | """ |
| 1105 | Return the (x, y) position of the *bbox* anchored at the *parentbbox* with |
| 1106 | the *loc* code with the *borderpad* and padding *pad_x*, *pad_y*. |
| 1107 | """ |
| 1108 | # This is only called internally and *loc* should already have been |
| 1109 | # validated. If 0 (None), we just let ``bbox.anchored`` raise. |
| 1110 | c = [None, "NE", "NW", "SW", "SE", "E", "W", "E", "S", "N", "C"][loc] |
| 1111 | container = parentbbox.padded(-pad_x, -pad_y) |
| 1112 | return bbox.anchored(c, container=container).p0 |
| 1113 | |
| 1114 | |
| 1115 | class AnchoredText(AnchoredOffsetbox): |
no test coverage detected
searching dependent graphs…