A Spectrum-Shaping Perspective on Cognitive Radio