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