def bresenham_line(x0, y0, x1, y1):
    """
    Return all pixels between (x0, y0) and (x1, y1) as a list.

    :param x0: Self explanatory.
    :param y0: Self explanatory.
    :param x1: Self explanatory.
    :param y1: Self explanatory.
    :return: List of pixel coordinate tuples.
    """

    steep = abs(y1 - y0) > abs(x1 - x0)
    if steep:
        x0, y0 = y0, x0
        x1, y1 = y1, x1

    switched = False
    if x0 > x1:
        switched = True
        x0, x1 = x1, x0
        y0, y1 = y1, y0

    if y0 < y1:
        y_step = 1
    else:
        y_step = -1

    delta_x = x1 - x0
    delta_y = abs(y1 - y0)
    error = - delta_x / 2
    y = y0

    line = []
    for x in range(x0, x1 + 1):
        if steep:
            line.append((y, x))
        else:
            line.append((x, y))

        error = error + delta_y
        if error > 0:
            y = y + y_step
            error = error - delta_x

    if switched:
        line.reverse()
    return line