A geometrical characterization of intrinsic ultracontractivity for planar domains with boundaries given by the graphs of functions