C / graphics.h / getfillsettings
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: getfillsettings()
Sintaxis:
Descripcion: Esta función es usada para obtener la información de tramas de relleno. El argumento *info apunta a una estructura de tipo fillsettingstype, el cual es actualizado cuando se llama a la función getfillsettings. La estructura es:
struct fillsettingstype {
int pattern;
int color;
};
El campo pattern es la trama y el campo color es el color de relleno de la trama.
Existen trece valores ya definidos para tramas.
Ejemplo:
Sintaxis:
void far getfillsettings(struct fillsettingstype far *info);
Descripcion: Esta función es usada para obtener la información de tramas de relleno. El argumento *info apunta a una estructura de tipo fillsettingstype, el cual es actualizado cuando se llama a la función getfillsettings. La estructura es:
struct fillsettingstype {
int pattern;
int color;
};
El campo pattern es la trama y el campo color es el color de relleno de la trama.
Existen trece valores ya definidos para tramas.
Ejemplo:
#include <graphics.h> #include <conio.h> #include <stdio.h> int main() { int gdriver = EGA; int gmodo = EGAHI; struct fillsettingstype info; /* 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ónde se encuentra el dispositivo gráfico */ initgraph( &gdriver, &gmodo, "C:\\BC5\\BGI" ); getfillsettings( &info ); bar( 50, 50, 350, 300 ); getch(); /* Pausa */ closegraph(); printf( "Trama de relleno: %d\tColor de relleno: %d\n", info.pattern, info.color ); return 0; }