Parameters ---------- bbox : Bbox The child bounding box to wrap. x0 : float or None The locked value for x0, or None to leave unlocked. y0 : float or None The locked value for y0, or None to leave unlocked. x1 :
(self, bbox, x0=None, y0=None, x1=None, y1=None, **kwargs)
| 1100 | accordingly with the exception of the locked elements. |
| 1101 | """ |
| 1102 | def __init__(self, bbox, x0=None, y0=None, x1=None, y1=None, **kwargs): |
| 1103 | """ |
| 1104 | Parameters |
| 1105 | ---------- |
| 1106 | bbox : Bbox |
| 1107 | The child bounding box to wrap. |
| 1108 | |
| 1109 | x0 : float or None |
| 1110 | The locked value for x0, or None to leave unlocked. |
| 1111 | |
| 1112 | y0 : float or None |
| 1113 | The locked value for y0, or None to leave unlocked. |
| 1114 | |
| 1115 | x1 : float or None |
| 1116 | The locked value for x1, or None to leave unlocked. |
| 1117 | |
| 1118 | y1 : float or None |
| 1119 | The locked value for y1, or None to leave unlocked. |
| 1120 | |
| 1121 | """ |
| 1122 | if not bbox.is_bbox: |
| 1123 | raise ValueError("'bbox' is not a bbox") |
| 1124 | |
| 1125 | BboxBase.__init__(self, **kwargs) |
| 1126 | self._bbox = bbox |
| 1127 | self.set_children(bbox) |
| 1128 | self._points = None |
| 1129 | fp = [x0, y0, x1, y1] |
| 1130 | mask = [val is None for val in fp] |
| 1131 | self._locked_points = np.ma.array(fp, float, mask=mask).reshape((2, 2)) |
| 1132 | |
| 1133 | def __str__(self): |
| 1134 | return ("{}(\n" |
nothing calls this directly
no test coverage detected