Erase the current image of the ball

This is where things depart from the earlier bouncing-ball program. 

Listing 7 erases the current image of the ball:

  1. By calling the blit function
  2. To draw the previously-saved portion of the background image over the ball.

Listing 7. Erase the current image of the ball.
  blit(smallBuffer,buffer,
       0,0,
       tempX-radius-1,tempY-radius-1,
       radius*2+2,radius*2+2);