Listing 5. The draw function.
void draw(int xCoor,int yCoor,BITMAP* buf,int color){ show_mouse(NULL);//hide mouse pointer while drawing //Draw filled circle at mouse coor on off-screen buffer. circlefill(buf,xCoor,yCoor,5,color); //Copy the off-screen image to the screen. blit(buf,screen,0,0,0,0,440,500); show_mouse(screen);//show mouse when drawing finished }//end draw |