fillpoly function c graphic

fillpoly function is used to draw and fill polygon. It will takes two argumnet same as drawpoly function.

General syntax of fillpoly function is :
                                      fillpoly( int num, int *polypoint);

                                           fillpoly function fill white color by default. To change fill color and pattern style we need to use setfillstyle function.


C graphic program to demonstrate fillpoly function.

#include <graphics.h>
#include <stdio.h>
int main( )
{
    int gd=DETECT, gm;
     int points[]={150,130,350,130,350,400,250,400,150,130};
    initgraph(&gd,&gm,"C:\\tc\\bgi");

    fillpoly(5,points);
    getch();
    closegraph();
    return 0;
}



fillpoly function of c graphics

Download



0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.