MCPcopy Create free account
hub / github.com/Image-Py/imagepy / make_ellipse

Function make_ellipse

imagepy/core/mark/mark.py:159–164  ·  view source on GitHub ↗
(l1, l2, ang)

Source from the content-addressed store, hash-verified

157 dc.SetBrush(brush)
158
159def make_ellipse(l1, l2, ang):
160 m = np.array([[l1*cos(-ang),-l2*sin(-ang)],
161 [l1*sin(-ang),l2*cos(-ang)]])
162 a = np.linspace(0, np.pi*2, 36)
163 xys = np.array((np.cos(a), np.sin(a)))
164 return np.dot(m, xys).T
165
166def draw_ellipse(pts, dc, f, **key):
167 pen, brush = dc.GetPen(), dc.GetBrush()

Callers 2

draw_ellipseFunction · 0.85
mark.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected