The resonance fluorescence of a two-level system driven by a smooth pulse