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

Method draw_sector

src/__init__.py:11259–11303  ·  view source on GitHub ↗

Draw a circle sector given circle center, one arc end point and the angle of the arc. Parameters: center -- center of circle point -- arc end point beta -- angle of arc (degrees) fullSector -- connect arc ends with center

(
            page: 'Page',
            center: point_like,
            point: point_like,
            beta: float,
            color: OptSeq = (0,),
            fill: OptSeq = None,
            dashes: OptStr = None,
            fullSector: bool = True,
            morph: OptSeq = None,
            width: float = 1,
            closePath: bool = False,
            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

11257 return Q
11258
11259 def draw_sector(
11260 page: 'Page',
11261 center: point_like,
11262 point: point_like,
11263 beta: float,
11264 color: OptSeq = (0,),
11265 fill: OptSeq = None,
11266 dashes: OptStr = None,
11267 fullSector: bool = True,
11268 morph: OptSeq = None,
11269 width: float = 1,
11270 closePath: bool = False,
11271 lineCap: int = 0,
11272 lineJoin: int = 0,
11273 overlay: bool = True,
11274 stroke_opacity: float = 1,
11275 fill_opacity: float = 1,
11276 oc: int = 0,
11277 ) -> Point:
11278 """Draw a circle sector given circle center, one arc end point and the angle of the arc.
11279
11280 Parameters:
11281 center -- center of circle
11282 point -- arc end point
11283 beta -- angle of arc (degrees)
11284 fullSector -- connect arc ends with center
11285 """
11286 img = page.new_shape()
11287 Q = img.draw_sector(Point(center), Point(point), beta, fullSector=fullSector)
11288 img.finish(
11289 color=color,
11290 fill=fill,
11291 dashes=dashes,
11292 width=width,
11293 lineCap=lineCap,
11294 lineJoin=lineJoin,
11295 morph=morph,
11296 closePath=closePath,
11297 stroke_opacity=stroke_opacity,
11298 fill_opacity=fill_opacity,
11299 oc=oc,
11300 )
11301 img.commit(overlay)
11302
11303 return Q
11304
11305 def draw_squiggle(
11306 page: 'Page',

Callers

nothing calls this directly

Calls 4

PointClass · 0.85
new_shapeMethod · 0.80
finishMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected