def ellipse(pen, (x, y, rx, ry)):
    bcpx = BEZIER_ARC_CIRCLE * rx
    bcpy = BEZIER_ARC_CIRCLE * ry
    pen.moveTo( (x, y + rx) )
    pen.curveTo( (x + bcpx, y + ry), (x + rx, y + bcpy), (x + rx, y) )
    pen.curveTo( (x + rx, y - bcpy), (x + bcpx, y - ry), (x, y - ry) )
    pen.curveTo( (x - bcpx, y - ry), (x - rx, y - bcpy), (x - rx, y) )
    pen.curveTo( (x - rx, y + bcpy), (x - bcpx, y + ry), (x, y + ry) )
    pen.closePath()
Draw an ellipse with a pen object.
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/modules/primitives.py/ellipse