def __init__(self, hx, hy): verts = [(0, 0), (0, -1), (-hx, -1 + hy), (0, -1), (hx, -1 + hy), (0, -1), (0, 0)] codes = [ Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY ] Path.__init__(self, verts, codes)
def __init__(self, hx, hy): '''Create an down-pointing arrow-shaped path. *hx* is the half-width of the arrow head (in units of the arrow length). *hy* is the height of the arrow head (in units of the arrow length).''' verts = [(0, 0), (0, -1), (-hx, -1 + hy), (0, -1), (hx, -1 + hy), (0, -1), (0, 0)] codes = [ Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY ] Path.__init__(self, verts, codes)