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

Method draw_quad

src/__init__.py:11188–11220  ·  view source on GitHub ↗

Draw a quadrilateral.

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

Source from the content-addressed store, hash-verified

11186 return Q
11187
11188 def draw_quad(
11189 page: 'Page',
11190 quad: quad_like,
11191 color: OptSeq = (0,),
11192 fill: OptSeq = None,
11193 dashes: OptStr = None,
11194 width: float = 1,
11195 lineCap: int = 0,
11196 lineJoin: int = 0,
11197 morph: OptSeq = None,
11198 overlay: bool = True,
11199 stroke_opacity: float = 1,
11200 fill_opacity: float = 1,
11201 oc: int = 0,
11202 ) -> Point:
11203 """Draw a quadrilateral."""
11204 img = page.new_shape()
11205 Q = img.draw_quad(Quad(quad))
11206 img.finish(
11207 color=color,
11208 fill=fill,
11209 dashes=dashes,
11210 width=width,
11211 lineCap=lineCap,
11212 lineJoin=lineJoin,
11213 morph=morph,
11214 stroke_opacity=stroke_opacity,
11215 fill_opacity=fill_opacity,
11216 oc=oc,
11217 )
11218 img.commit(overlay)
11219
11220 return Q
11221
11222 def draw_rect(
11223 page: 'Page',

Callers 1

test_drawings2Function · 0.45

Calls 4

QuadClass · 0.85
new_shapeMethod · 0.80
finishMethod · 0.45
commitMethod · 0.45

Tested by 1

test_drawings2Function · 0.36