C / graphics.h / cleardevice
arc, bar, bar3d, circle, » cleardevice, clearviewport, closegraph, detectgraph, drawpoly, ellipse, fillellipse, fillpoly, floodfill, getarccoords, getaspectratio, getbkcolor, getcolor, getdefaultpalette, getdrivername, getfillpattern, getfillsettings, getgraphmode, getimage, getlinesettings, getmaxcolor, getmaxmode, getmaxx, getmaxy, getmodename, getmoderange, getpalette, getpalettesize, getpixel, gettextsettings, getviewsettings, getx, gety, graphdefaults, grapherrormsg, _graphfreemem, _graphgetmem, graphresult, imagesize, initgraph, installuserdriver, installuserfont, line, linerel, lineto, moverel, moveto, outtext, outtextxy, pieslice, putimage, putpixel, rectangle, registerbgidriver, registerbgifont, restorecrtmode, sector, setactivepage, setallpalette, setaspectratio, setbkcolor, setfillpattern, setfillstyle, setgraphbufsize, setgraphmode, setlinestyle, setpalette, setrgbpalette, settextjustify, settextstyle, setusercharsize, setviewport, setvisualpage, setwritemode, textheight, textwidth,
Funcion: cleardevice()
Sintaxis:
void far cleardevice(void);

Descripcion: Esta función es usada para despejar una pantalla gráfica. La función cleardevice usa el color de fondo actual, como es establecido por la función setbkcolor, para rellenar la pantalla. La posición del cursor gráfico es la esquina superior izquierda de la pantalla - posición (0,0) - después de que la pantalla haya sido borrado.
Ejemplo:
#include <graphics.h>
#include <conio.h>
 
int main() {
   int gdriver = EGA;
   int gmodo = EGAHI;
   int relleno, color;
 
/* Si has registrado los dispositivos para que formen parte de graphics.lib
** entonces usa estas sentencias:
 
   registerbgidriver( EGAVGA_driver );
   initgraph( &gdriver, &gmodo, "" );
*/
 
/* Si no, entonces has de "decir" d&oacute;nde se encuentra el dispositivo gr&aacute;fico */
 
   initgraph( &gdriver, &gmodo, "C:\\BC5\\BGI" );
 
   relleno = 1;
   color = 1;
 
   setlinestyle( SOLID_LINE, relleno, THICK_WIDTH );
   circle( 300, 200, 80 );
   getch();    /* Pausa */
 
   setbkcolor( color );
   cleardevice();
   setlinestyle( SOLID_LINE, relleno, THICK_WIDTH );
   circle( 400, 200, 20 );
 
   getch();    /* Pausa */
   closegraph();
 
   return 0;
}

Librerias C

Librerias ANSI C
   string.hcstring
   math.hcmath
   stdio.hcstdio
   time.hctime
   stdlib.hcstdlib
   ctype.hcctype
   locale.hclocale
   signal.hcsignal
   setjmp.hcsetjmp

Librerias Borland
   conio.h
   graphics.h