MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _append_path

Function _append_path

lib/matplotlib/backends/backend_cairo.py:45–60  ·  view source on GitHub ↗
(ctx, path, transform, clip=None)

Source from the content-addressed store, hash-verified

43
44
45def _append_path(ctx, path, transform, clip=None):
46 for points, code in path.iter_segments(
47 transform, remove_nans=True, clip=clip):
48 if code == Path.MOVETO:
49 ctx.move_to(*points)
50 elif code == Path.CLOSEPOLY:
51 ctx.close_path()
52 elif code == Path.LINETO:
53 ctx.line_to(*points)
54 elif code == Path.CURVE3:
55 cur = np.asarray(ctx.get_current_point())
56 a = points[:2]
57 b = points[-2:]
58 ctx.curve_to(*(cur / 3 + a * 2 / 3), *(a * 2 / 3 + b / 3), *b)
59 elif code == Path.CURVE4:
60 ctx.curve_to(*points)
61
62
63def _cairo_font_args_from_font_prop(prop):

Callers 3

draw_pathMethod · 0.85
draw_markersMethod · 0.85
set_clip_pathMethod · 0.85

Calls 1

iter_segmentsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…