def get_pos_hint_x(poshints, sizehintx):
    """Return ``poshints['x']`` if available, or its computed equivalent
    otherwise.

    """
    if 'x' in poshints:
        return poshints['x']
    elif sizehintx is not None:
        if 'center_x' in poshints:
            return poshints['center_x'] - sizehintx / 2
        elif 'right' in poshints:
            return poshints['right'] - sizehintx
