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

Method convert_path

lib/matplotlib/backends/backend_wx.py:180–193  ·  view source on GitHub ↗
(gfx_ctx, path, transform)

Source from the content-addressed store, hash-verified

178
179 @staticmethod
180 def convert_path(gfx_ctx, path, transform):
181 wxpath = gfx_ctx.CreatePath()
182 for points, code in path.iter_segments(transform):
183 if code == Path.MOVETO:
184 wxpath.MoveToPoint(*points)
185 elif code == Path.LINETO:
186 wxpath.AddLineToPoint(*points)
187 elif code == Path.CURVE3:
188 wxpath.AddQuadCurveToPoint(*points)
189 elif code == Path.CURVE4:
190 wxpath.AddCurveToPoint(*points)
191 elif code == Path.CLOSEPOLY:
192 wxpath.CloseSubpath()
193 return wxpath
194
195 def draw_path(self, gc, path, transform, rgbFace=None):
196 # docstring inherited

Callers 1

draw_pathMethod · 0.95

Calls 1

iter_segmentsMethod · 0.80

Tested by

no test coverage detected