def rectangle(x, y, w, h):
    """
    Get pixels to draw a rectangle

    :param x: top left corner x
    :param y: top left corner y
    :param w: width of the rectangle
    :param h: height of the rectangle
    :return: all pixels belonging to rectangle as (x, y) tuple
    """

    result = []
    for xx in range(w):
        for yy in range(h):
            result.append((xx + x, yy + y))

    return result