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

Function draw_polyline

src_classic/utils.py:2071–2105  ·  view source on GitHub ↗

Draw multiple connected line segments.

(
    page: Page,
    points: list,
    color: OptSeq = (0,),
    fill: OptSeq = None,
    dashes: OptStr = None,
    width: float = 1,
    morph: OptSeq = None,
    lineCap: int = 0,
    lineJoin: int = 0,
    overlay: bool = True,
    closePath: bool = False,
    stroke_opacity: float = 1,
    fill_opacity: float = 1,
    oc: int = 0,
)

Source from the content-addressed store, hash-verified

2069
2070
2071def draw_polyline(
2072 page: Page,
2073 points: list,
2074 color: OptSeq = (0,),
2075 fill: OptSeq = None,
2076 dashes: OptStr = None,
2077 width: float = 1,
2078 morph: OptSeq = None,
2079 lineCap: int = 0,
2080 lineJoin: int = 0,
2081 overlay: bool = True,
2082 closePath: bool = False,
2083 stroke_opacity: float = 1,
2084 fill_opacity: float = 1,
2085 oc: int = 0,
2086) -> Point:
2087 """Draw multiple connected line segments."""
2088 img = page.new_shape()
2089 Q = img.draw_polyline(points)
2090 img.finish(
2091 color=color,
2092 fill=fill,
2093 dashes=dashes,
2094 width=width,
2095 lineCap=lineCap,
2096 lineJoin=lineJoin,
2097 morph=morph,
2098 closePath=closePath,
2099 stroke_opacity=stroke_opacity,
2100 fill_opacity=fill_opacity,
2101 oc=oc,
2102 )
2103 img.commit(overlay)
2104
2105 return Q
2106
2107
2108def draw_circle(

Callers

nothing calls this directly

Calls 4

new_shapeMethod · 0.80
draw_polylineMethod · 0.45
finishMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…