A general polycurve path patch.
| 1094 | |
| 1095 | |
| 1096 | class PathPatch(Patch): |
| 1097 | """A general polycurve path patch.""" |
| 1098 | |
| 1099 | _edge_default = True |
| 1100 | |
| 1101 | def __str__(self): |
| 1102 | s = "PathPatch%d((%g, %g) ...)" |
| 1103 | return s % (len(self._path.vertices), *tuple(self._path.vertices[0])) |
| 1104 | |
| 1105 | @_docstring.interpd |
| 1106 | def __init__(self, path, **kwargs): |
| 1107 | """ |
| 1108 | *path* is a `.Path` object. |
| 1109 | |
| 1110 | Valid keyword arguments are: |
| 1111 | |
| 1112 | %(Patch:kwdoc)s |
| 1113 | """ |
| 1114 | super().__init__(**kwargs) |
| 1115 | self._path = path |
| 1116 | |
| 1117 | def get_path(self): |
| 1118 | return self._path |
| 1119 | |
| 1120 | def set_path(self, path): |
| 1121 | self._path = path |
| 1122 | |
| 1123 | |
| 1124 | class StepPatch(PathPatch): |
no outgoing calls
searching dependent graphs…