docs: def coords_on_grid(self, x, y):
          """ Snap coordinates on the grid with integer coordinates """
  
          if isinstance(x, float):
              x = int(self._round(x))
          if isinstance(y, float):
              y = int(self._round(y))
          if not self._y_coord_down:
              y = self._extents - y
          return x, y