Пример #1
0
def math2rect(r):
    """Convert mathematical coordinates to rectangle coordinates."""
    (x0,y0,x1,y1) = r
    return iulib.rectangle(x0,y0,x1,y1)
Пример #2
0
def math2rect(r):
    """Convert mathematical coordinates to rectangle coordinates."""
    (x0, y0, x1, y1) = r
    return iulib.rectangle(x0, y0, x1, y1)
Пример #3
0
def raster2rect(r,h):
    """Convert raster coordinates (row,col,row,col) to iulib
    rectangles.  Input is (row0,col0,row1,col1)."""
    (r0,c0,r1,c1) = r
    return iulib.rectangle(c0,h-r1-1,c1,h-r0-1)
Пример #4
0
def raster2rect(r, h):
    """Convert raster coordinates (row,col,row,col) to iulib
    rectangles.  Input is (row0,col0,row1,col1)."""
    (r0, c0, r1, c1) = r
    return iulib.rectangle(c0, h - r1 - 1, c1, h - r0 - 1)