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

Method draw_curve

src/__init__.py:14979–14992  ·  view source on GitHub ↗

Draw a curve between points using one control point.

(
        self,
        p1: point_like,
        p2: point_like,
        p3: point_like,
    )

Source from the content-addressed store, hash-verified

14977 return self.draw_sector(center, p1, 360, fullSector=False)
14978
14979 def draw_curve(
14980 self,
14981 p1: point_like,
14982 p2: point_like,
14983 p3: point_like,
14984 ) -> Point:
14985 """Draw a curve between points using one control point."""
14986 kappa = 0.55228474983
14987 p1 = Point(p1)
14988 p2 = Point(p2)
14989 p3 = Point(p3)
14990 k1 = p1 + (p2 - p1) * kappa
14991 k2 = p3 + (p2 - p3) * kappa
14992 return self.draw_bezier(p1, k1, k2, p3)
14993
14994 def draw_sector(
14995 self,

Callers 3

draw_ovalMethod · 0.95
draw_rectMethod · 0.95
draw_squiggleMethod · 0.95

Calls 2

draw_bezierMethod · 0.95
PointClass · 0.85

Tested by

no test coverage detected