Professional Documents
Culture Documents
Asgnment Graphics 3
Asgnment Graphics 3
CODING
#include glib.h
void main(void)
{
ginit();
{
setcolor(15); //* set the painting color white *//
rectangle(200,205.5,350.5,160.5);
//* draw rectangle *//
setfillstyle(4,12);
//* paint inside with color red with pattern 4 *//
floodfill(250,180,15);
//* fill inside the rectangle *//
setcolor(5); //* set the painting color purple *//
rectangle(200,230,100,140); //* draw rectangle *//
setfillstyle(2,14); //* paint inside with color bright yellow with pattern 2 *//
floodfill(195,225,5); //* fill inside the rectangle *//
setcolor(14); //* set the painting color bright yellow *//
rectangle(265.205.5,280,350); //* draw rectangle *//
setfillstyle(5,9); //* paint inside with color bright blue with pattern 5 *//
floodfill(279,250,14); //* fill the rectangle *//
setcolor(6); //*set the painting color yellow *//
ellipse(430,185.5,0,360,80,50.5); //* draw ellipse *//
setfillstyle(9,10); //*paint inside with bright blue with pattern 9 *//
floodfill(370,170,6); //* fill inside the ellipse *//
setcolor(4); //* set the painting color red *//
ellipse(430,185,0,360,30,25); //*draw ellipse *//
setfillstyle(5,15); //* paint inside with white with pattern 5 *//
floodfill(270.5,400,2); //* fill inside the ellipse *//
setcolor(2); //* set the painting color green *//
ellipse(270.5,400,0,360,100,50); //* draw ellipse *//
setfillstyle(11,5); //* paint inside with purple with pattern 11 *//
floodfill(270,400,2); //* fill inside the ellipse *//
OUTPUT :