The electromagnetic structure of the pion