Draw a circle given its center and radius.
(
page: Page,
center: point_like,
radius: float,
color: OptSeq = (0,),
fill: OptSeq = None,
morph: OptSeq = None,
dashes: OptStr = None,
width: float = 1,
lineCap: int = 0,
lineJoin: int = 0,
overlay: bool = True,
stroke_opacity: float = 1,
fill_opacity: float = 1,
oc: int = 0,
)
| 2106 | |
| 2107 | |
| 2108 | def draw_circle( |
| 2109 | page: Page, |
| 2110 | center: point_like, |
| 2111 | radius: float, |
| 2112 | color: OptSeq = (0,), |
| 2113 | fill: OptSeq = None, |
| 2114 | morph: OptSeq = None, |
| 2115 | dashes: OptStr = None, |
| 2116 | width: float = 1, |
| 2117 | lineCap: int = 0, |
| 2118 | lineJoin: int = 0, |
| 2119 | overlay: bool = True, |
| 2120 | stroke_opacity: float = 1, |
| 2121 | fill_opacity: float = 1, |
| 2122 | oc: int = 0, |
| 2123 | ) -> Point: |
| 2124 | """Draw a circle given its center and radius.""" |
| 2125 | img = page.new_shape() |
| 2126 | Q = img.draw_circle(Point(center), radius) |
| 2127 | img.finish( |
| 2128 | color=color, |
| 2129 | fill=fill, |
| 2130 | dashes=dashes, |
| 2131 | width=width, |
| 2132 | lineCap=lineCap, |
| 2133 | lineJoin=lineJoin, |
| 2134 | morph=morph, |
| 2135 | stroke_opacity=stroke_opacity, |
| 2136 | fill_opacity=fill_opacity, |
| 2137 | oc=oc, |
| 2138 | ) |
| 2139 | img.commit(overlay) |
| 2140 | return Q |
| 2141 | |
| 2142 | |
| 2143 | def draw_oval( |
nothing calls this directly
no test coverage detected
searching dependent graphs…