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

Method _le_butt

src/__init__.py:24932–24945  ·  view source on GitHub ↗

Make stream commands for butt line end symbol. "lr" denotes left (False) or right point.

(annot, p1, p2, lr, fill_color)

Source from the content-addressed store, hash-verified

24930
24931 @staticmethod
24932 def _le_butt(annot, p1, p2, lr, fill_color):
24933 """Make stream commands for butt line end symbol. "lr" denotes left (False) or right point.
24934 """
24935 m, im, L, R, w, scol, fcol, opacity = TOOLS._le_annot_parms(annot, p1, p2, fill_color)
24936 shift = 3
24937 d = shift * max(1, w)
24938 M = R if lr else L
24939 top = (M + (0, -d/2.)) * im
24940 bot = (M + (0, d/2.)) * im
24941 ap = f"\nq\n{opacity}{top.x:f} {top.y:f} m\n"
24942 ap += f"{bot.x:f} {bot.y:f} l\n"
24943 ap += _format_g(w) + " w\n"
24944 ap += scol + "s\nQ\n"
24945 return ap
24946
24947 @staticmethod
24948 def _le_circle(annot, p1, p2, lr, fill_color):

Callers

nothing calls this directly

Calls 2

_format_gFunction · 0.85
_le_annot_parmsMethod · 0.80

Tested by

no test coverage detected