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

Function draw_oval

src_classic/utils.py:2143–2175  ·  view source on GitHub ↗

Draw an oval given its containing rectangle or quad.

(
    page: Page,
    rect: typing.Union[rect_like, quad_like],
    color: OptSeq = (0,),
    fill: OptSeq = None,
    dashes: OptStr = None,
    morph: OptSeq = 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

2141
2142
2143def draw_oval(
2144 page: Page,
2145 rect: typing.Union[rect_like, quad_like],
2146 color: OptSeq = (0,),
2147 fill: OptSeq = None,
2148 dashes: OptStr = None,
2149 morph: OptSeq = None,
2150 width: float = 1,
2151 lineCap: int = 0,
2152 lineJoin: int = 0,
2153 overlay: bool = True,
2154 stroke_opacity: float = 1,
2155 fill_opacity: float = 1,
2156 oc: int = 0,
2157) -> Point:
2158 """Draw an oval given its containing rectangle or quad."""
2159 img = page.new_shape()
2160 Q = img.draw_oval(rect)
2161 img.finish(
2162 color=color,
2163 fill=fill,
2164 dashes=dashes,
2165 width=width,
2166 lineCap=lineCap,
2167 lineJoin=lineJoin,
2168 morph=morph,
2169 stroke_opacity=stroke_opacity,
2170 fill_opacity=fill_opacity,
2171 oc=oc,
2172 )
2173 img.commit(overlay)
2174
2175 return Q
2176
2177
2178def draw_curve(

Callers

nothing calls this directly

Calls 4

new_shapeMethod · 0.80
draw_ovalMethod · 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…