locsize2bounds¶

locsize2bounds(location, size)[source]¶

Convert a location and size to bounds.

Parameters:
  • location (tuple(int)) – A 2-tuple or length 2 array of x,y coordinates.

  • size (tuple(int)) – A 2-tuple or length 2 array of width and height.

Returns:

A tuple of bounds: - int - left / start_x - int - top / start_y - int - right / end_x - int - bottom / end_y

Return type:

tuple