def _oval_string(self, p1, p2, p3, p4):
def bezier(p, q, r):<EOL><INDENT>f = "<STR_LIT>"<EOL>return f % (p.x, p.y, q.x, q.y, r.x, r.y)<EOL><DEDENT>kappa = <NUM_LIT>              <EOL>ml = p1 + (p4 - p1) * <NUM_LIT:0.5>          <EOL>mo = p1 + (p2 - p1) * <NUM_LIT:0.5>          <EOL>mr = p2 + (p3 - p2) * <NUM_LIT:0.5>          <EOL>mu = p4 + (p3 - p4) * <NUM_LIT:0.5>          <EOL>ol1 = ml + (p1 - ml) * kappa       <EOL>ol2 = mo + (p1 - mo) * kappa       <EOL>or1 = mo + (p2 - mo) * kappa<EOL>or2 = mr + (p2 - mr) * kappa<EOL>ur1 = mr + (p3 - mr) * kappa<EOL>ur2 = mu + (p3 - mu) * kappa<EOL>ul1 = mu + (p4 - mu) * kappa<EOL>ul2 = ml + (p4 - ml) * kappa<EOL>w draw, starting from middle point of left side<EOL>ap = "<STR_LIT>" % (ml.x, ml.y)<EOL>ap += bezier(ol1, ol2, mo)<EOL>ap += bezier(or1, or2, mr)<EOL>ap += bezier(ur1, ur2, mu)<EOL>ap += bezier(ul1, ul2, ml)<EOL>return ap<EOL>
Return /AP string defining an oval within a 4-polygon provided as points