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

Method _le_circle

src/__init__.py:24948–24959  ·  view source on GitHub ↗

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

(annot, p1, p2, lr, fill_color)

Source from the content-addressed store, hash-verified

24946
24947 @staticmethod
24948 def _le_circle(annot, p1, p2, lr, fill_color):
24949 """Make stream commands for circle line end symbol. "lr" denotes left (False) or right point.
24950 """
24951 m, im, L, R, w, scol, fcol, opacity = TOOLS._le_annot_parms(annot, p1, p2, fill_color)
24952 shift = 2.5 # 2*shift*width = length of square edge
24953 d = shift * max(1, w)
24954 M = R - (d/2., 0) if lr else L + (d/2., 0)
24955 r = Rect(M, M) + (-d, -d, d, d) # the square
24956 ap = "q\n" + opacity + TOOLS._oval_string(r.tl * im, r.tr * im, r.br * im, r.bl * im)
24957 ap += _format_g(w) + " w\n"
24958 ap += scol + fcol + "b\nQ\n"
24959 return ap
24960
24961 @staticmethod
24962 def _le_closedarrow(annot, p1, p2, lr, fill_color):

Callers

nothing calls this directly

Calls 4

RectClass · 0.85
_format_gFunction · 0.85
_le_annot_parmsMethod · 0.80
_oval_stringMethod · 0.80

Tested by

no test coverage detected