Get point coordinates in next block.

        Parameters
        ----------
        x : `int`
            X coordinate in current block.
        y : `int`
            Y coordinate in current block.
        block_index : `int`
            Current block index in next block.
        block_size : `int`
            Current block size.

        Raises
        ------
        IndexError
            If block index is out of range.

        Returns
        -------
        (`int`, `int`)
            Point coordinates.

def get_point_in_block(cls, x, y, block_idx, block_size):
        """Get point coordinates in next block.

        Parameters
        ----------
        x : `int`
            X coordinate in current block.
        y : `int`
            Y coordinate in current block.
        block_index : `int`
            Current block index in next block.
        block_size : `int`
            Current block size.

        Raises
        ------
        IndexError
            If block index is out of range.

        Returns
        -------
        (`int`, `int`)
            Point coordinates.
        """
        if block_idx == 0:
            return y, x
        if block_idx == 1:
            return x, y + block_size
        if block_idx == 2:
            return x + block_size, y + block_size
        if block_idx == 3:
            x, y = block_size - 1 - y, block_size - 1 - x
            return x + block_size, y
        raise IndexError('block index out of range: %d' % block_idx)