RE:como hacer un rectangulo de color amarillo
puedes utilizar el comando poly para dibujar tu figura y con el comando fillpoly se puede rellenar, como ejemplo copia el siguiente codigo que te puede servir de referencia:
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
int i, maxx, maxy;
int poly[8];
initgraph(&gdriver, &gmode, "");
errorcode = graphresult();
if (errorcode != grOk)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
maxx = getmaxx();
maxy = getmaxy();
poly[0] = 20; /* 1st vertex */
poly[1] = maxy / 2;
poly[2] = maxx - 20; /* 2nd */
poly[3] = 20;
poly[4] = maxx - 50; /* 3rd */
poly[5] = maxy - 20;
poly[6] = maxx / 2;
poly[7] = maxy / 2;
for (i=EMPTY_FILL; i<USER_FILL; i++)
{
setfillstyle(i, getmaxcolor());
fillpoly(4, poly);
getch();
}
/* clean up */
closegraph();
return 0;
}
ojala te sirva de algo ...
suerte...