@@ -156,6 +156,9 @@ def _update_values(self):
156
156
157
157
@property
158
158
def vertices (self ):
159
+ """
160
+ The list of vertices in the `Path` as an Nx2 numpy array.
161
+ """
159
162
return self ._vertices
160
163
161
164
@vertices .setter
@@ -167,6 +170,14 @@ def vertices(self, vertices):
167
170
168
171
@property
169
172
def codes (self ):
173
+ """
174
+ The list of codes in the `Path` as a 1-D numpy array. Each
175
+ code is one of `STOP`, `MOVETO`, `LINETO`, `CURVE3`, `CURVE4`
176
+ or `CLOSEPOLY`. For codes that correspond to more than one
177
+ vertex (`CURVE3` and `CURVE4`), that code will be repeated so
178
+ that the length of `self.vertices` and `self.codes` is always
179
+ the same.
180
+ """
170
181
return self ._codes
171
182
172
183
@codes .setter
@@ -178,27 +189,56 @@ def codes(self, codes):
178
189
179
190
@property
180
191
def simplify_threshold (self ):
192
+ """
193
+ The fraction of a pixel difference below which vertices will
194
+ be simplified out.
195
+ """
181
196
return self ._simplify_threshold
182
197
198
+ @simplify_threshold .setter
199
+ def simplify_threshold (self , threshold ):
200
+ self ._simplify_threshold = threshold
201
+
183
202
@property
184
203
def has_nonfinite (self ):
204
+ """
205
+ `True` if the vertices array has nonfinite values.
206
+ """
185
207
return self ._has_nonfinite
186
208
187
209
@property
188
210
def should_simplify (self ):
211
+ """
212
+ `True` if the vertices array should be simplified.
213
+ """
189
214
return self ._should_simplify
190
215
216
+ @should_simplify .setter
217
+ def should_simplify (self , should_simplify ):
218
+ self ._should_simplify = should_simplify
219
+
191
220
@property
192
221
def readonly (self ):
222
+ """
223
+ `True` if the `Path` is read-only.
224
+ """
193
225
return self ._readonly
194
226
195
227
def __copy__ (self ):
228
+ """
229
+ Returns a shallow copy of the `Path`, which will share the
230
+ vertices and codes with the source `Path`.
231
+ """
196
232
import copy
197
233
return copy .copy (self )
198
234
199
235
copy = __copy__
200
236
201
237
def __deepcopy__ (self ):
238
+ """
239
+ Returns a deepcopy of the `Path`. The `Path` will not be
240
+ readonly, even if the source `Path` is.
241
+ """
202
242
return self .__class__ (
203
243
self .vertices .copy (), self .codes .copy (),
204
244
_interpolation_steps = self ._interpolation_steps )
0 commit comments