pad_bounds

pad_bounds(bounds, padding)[source]

Add padding to bounds.

Parameters
  • bounds (tuple(int)) – Iterable of integer bounds. Must be even in length with the dirst half as starting values and the second half as end values, e.g. (start_x, start_y, stop_x, stop_y).

  • padding (int) – Padding to add to bounds.

Return type

Tuple[int, int, int, int]

Examples

>>> pad_bounds((0, 0, 0, 0), 1)
Returns

Tuple of bounds with padding to the edges.

Return type

tuple(int)

Parameters