graphical function are stored in the header file graphics.h
initgraph()
this function is used to initialize the graphics mode by oading the required graphics driver and the video mode from disk
Syntax:
void initgraph(int *gdriver,int *gmode;char path);
setcolor()
this function is used to set a new colour
Syntax:
void setcolor(int color);
line()
this function is used to draw a line
Syntax:
void line(int x1,int y1,int x2,int y2);
setlinestyle()
this function is used to set the style pattern and width of the line
Syntax:
void setlinestye(int style,unsigned pattern,int width);
setfillstyle()
this function is used to fill closed shapes with different style and colours
Syntax:
void setlinestyle(int pattern,int color);
circle()
this function is used to draw a circle
Syntax:
void circle(int x,y,int radius);
closegraph
exit from graphics mode
Syntax:
void closegraph();
cleardevice()
this function is used to clear the graphics screen Syntax:
void cleardevice();
rectangle
this function is used to draw a rectangle
Syntax:
void rectangle(int left,int top,int right,int bottom)
arc()
this function is used to draw an arc Syntax:
void arc(int x,int y,int sa,int ea,int r)
ellipse()
this function is used to draw a ellipse
Syntax:
void ellipse(int x,int y,int sa,int xr,int yr);
No comments