Convert a given mesh into a sequence of `.Path` objects. This function is primarily of use to implementers of backends that do not directly support meshes.
(tri)
| 2292 | |
| 2293 | @staticmethod |
| 2294 | def convert_mesh_to_paths(tri): |
| 2295 | """ |
| 2296 | Convert a given mesh into a sequence of `.Path` objects. |
| 2297 | |
| 2298 | This function is primarily of use to implementers of backends that do |
| 2299 | not directly support meshes. |
| 2300 | """ |
| 2301 | triangles = tri.get_masked_triangles() |
| 2302 | verts = np.stack((tri.x[triangles], tri.y[triangles]), axis=-1) |
| 2303 | return [mpath.Path(x) for x in verts] |
| 2304 | |
| 2305 | @artist.allow_rasterization |
| 2306 | def draw(self, renderer): |
no test coverage detected