def center(size, fit_size, offset):
    """
    Center a given area within another area at an offset.

    Arguments:
    size: a tuple containing the width and height of the area to be centered.
    fit_size: a tuple containing the width and heigh of the area in which to
    center 'size'
    offset: a tuple representing an x/y coordinate of the offset.

    """
    w, h = size
    fw, fh = fit_size
    x, y = offset
    return x + (fw - w) // 2, y + (fh - h) // 2