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

Method draw_oval

src/__init__.py:11118–11150  ·  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

11116 return p
11117
11118 def draw_oval(
11119 page: 'Page',
11120 rect: typing.Union[rect_like, quad_like],
11121 color: OptSeq = (0,),
11122 fill: OptSeq = None,
11123 dashes: OptStr = None,
11124 morph: OptSeq = None,
11125 width: float = 1,
11126 lineCap: int = 0,
11127 lineJoin: int = 0,
11128 overlay: bool = True,
11129 stroke_opacity: float = 1,
11130 fill_opacity: float = 1,
11131 oc: int = 0,
11132 ) -> Point:
11133 """Draw an oval given its containing rectangle or quad."""
11134 img = page.new_shape()
11135 Q = img.draw_oval(rect)
11136 img.finish(
11137 color=color,
11138 fill=fill,
11139 dashes=dashes,
11140 width=width,
11141 lineCap=lineCap,
11142 lineJoin=lineJoin,
11143 morph=morph,
11144 stroke_opacity=stroke_opacity,
11145 fill_opacity=fill_opacity,
11146 oc=oc,
11147 )
11148 img.commit(overlay)
11149
11150 return Q
11151
11152 def draw_polyline(
11153 page: 'Page',

Callers 1

test_drawings2Function · 0.45

Calls 3

new_shapeMethod · 0.80
finishMethod · 0.45
commitMethod · 0.45

Tested by 1

test_drawings2Function · 0.36