Return a `.Path` for the `.visible_edges`.
(self)
| 219 | self.stale = True |
| 220 | |
| 221 | def get_path(self): |
| 222 | """Return a `.Path` for the `.visible_edges`.""" |
| 223 | codes = [Path.MOVETO] |
| 224 | codes.extend( |
| 225 | Path.LINETO if edge in self._visible_edges else Path.MOVETO |
| 226 | for edge in self._edges) |
| 227 | if Path.MOVETO not in codes[1:]: # All sides are visible |
| 228 | codes[-1] = Path.CLOSEPOLY |
| 229 | return Path( |
| 230 | [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0], [0.0, 0.0]], |
| 231 | codes, |
| 232 | readonly=True |
| 233 | ) |
| 234 | |
| 235 | |
| 236 | CustomCell = Cell # Backcompat. alias. |