MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / moveto

Method moveto

src/__init__.py:23120–23146  ·  view source on GitHub ↗
(self, ctx, x, y)

Source from the content-addressed store, hash-verified

23118 raise
23119
23120 def moveto(self, ctx, x, y): # trace_moveto().
23121 if 0 and isinstance(self.dev.pathdict, dict):
23122 log(f'self.dev.pathdict:')
23123 for n, v in self.dev.pathdict.items():
23124 log( ' {type(n)=} {len(n)=} {n!r} {n}: {v!r}: {v}')
23125
23126 #log(f'Walker(): {type(self.dev.pathdict)=} {self.dev.pathdict=}')
23127
23128 try:
23129 #log( '{=dev.ctm type(dev.ctm)}')
23130 self.dev.lastpoint = mupdf.fz_transform_point(
23131 mupdf.fz_make_point(x, y),
23132 self.dev.ctm,
23133 )
23134 if mupdf.fz_is_infinite_rect( self.dev.pathrect):
23135 self.dev.pathrect = mupdf.fz_make_rect(
23136 self.dev.lastpoint.x,
23137 self.dev.lastpoint.y,
23138 self.dev.lastpoint.x,
23139 self.dev.lastpoint.y,
23140 )
23141 self.dev.firstpoint = self.dev.lastpoint
23142 self.dev.havemove = 1
23143 self.dev.linecount = 0 # reset # of consec. lines
23144 except Exception:
23145 if g_exceptions_verbose: exception_info()
23146 raise
23147
23148
23149def jm_lineart_path(dev, ctx, path):

Callers

nothing calls this directly

Calls 2

exception_infoFunction · 0.85
logFunction · 0.70

Tested by

no test coverage detected