Beispiel #1
0
def math2rect(r):
    """Convert mathematical coordinates to rectangle coordinates."""
    (x0,y0,x1,y1) = r
    return iulib.rectangle(x0,y0,x1,y1)
Beispiel #2
0
def math2rect(r):
    """Convert mathematical coordinates to rectangle coordinates."""
    (x0, y0, x1, y1) = r
    return iulib.rectangle(x0, y0, x1, y1)
Beispiel #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)
Beispiel #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)