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

Function draw_circle

src_classic/utils.py:2108–2140  ·  view source on GitHub ↗

Draw a circle given its center and radius.

(
    page: Page,
    center: point_like,
    radius: float,
    color: OptSeq = (0,),
    fill: OptSeq = None,
    morph: OptSeq = None,
    dashes: OptStr = None,
    width: float = 1,
    lineCap: int = 0,
    lineJoin: int = 0,
    overlay: bool = True,
    stroke_opacity: float = 1,
    fill_opacity: float = 1,
    oc: int = 0,
)

Source from the content-addressed store, hash-verified

2106
2107
2108def draw_circle(
2109 page: Page,
2110 center: point_like,
2111 radius: float,
2112 color: OptSeq = (0,),
2113 fill: OptSeq = None,
2114 morph: OptSeq = None,
2115 dashes: OptStr = None,
2116 width: float = 1,
2117 lineCap: int = 0,
2118 lineJoin: int = 0,
2119 overlay: bool = True,
2120 stroke_opacity: float = 1,
2121 fill_opacity: float = 1,
2122 oc: int = 0,
2123) -> Point:
2124 """Draw a circle given its center and radius."""
2125 img = page.new_shape()
2126 Q = img.draw_circle(Point(center), radius)
2127 img.finish(
2128 color=color,
2129 fill=fill,
2130 dashes=dashes,
2131 width=width,
2132 lineCap=lineCap,
2133 lineJoin=lineJoin,
2134 morph=morph,
2135 stroke_opacity=stroke_opacity,
2136 fill_opacity=fill_opacity,
2137 oc=oc,
2138 )
2139 img.commit(overlay)
2140 return Q
2141
2142
2143def draw_oval(

Callers

nothing calls this directly

Calls 5

PointClass · 0.85
new_shapeMethod · 0.80
draw_circleMethod · 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…