C program to draw 3 dimensional bar.
#include <graphics.h>
#include <stdio.h>
int main( )
{
int gd=DETECT, gm;
initgraph(&gd,&gm,"C:\\tc\\bgi");
bar3d(100,100,400,300,40,90);
getch();
closegraph();
return 0;
}
- Syntax to draw 3 dimensional bar is
bar3d(int left.int top,int right,int bottom, int depth,int topflag) - bar3d is used to draw 3 dimensional rectangular bar.
- It takes 6 arguments, all of the int datatype.
- First two arguments are left-top corner of the bar.
- Third and fourth arguments are right bottom corner of the bar.
- Fifth arguments is for specified depth of the bar in pixels.
- Sixth argument is for determines whether a 3 dimensional top is put on the bar or not.(if it is non zero then it put other wise not.)
C graphics program to draw 3 dimensional bar
#include <graphics.h>
#include <stdio.h>
int main( )
{
int gd=DETECT, gm;
initgraph(&gd,&gm,"C:\\tc\\bgi");
bar3d(100,100,400,300,40,90);
getch();
closegraph();
return 0;
}

Download |
---|
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.