Hot gases: The transition from line spectra to thermal radiation