Save a square portion of the background image
Listing 4 calls the blit function to
Each side of the square is two pixels larger than the diameter of the ball:
Listing 4. Save a square portion of the background image.
blit(buffer,smallBuffer, x-radius-1,y-radius-1, 0,0, radius*2+2,radius*2+2); |