Thursday, August 16, 2012
COMPUTER GRAPHICS PROGRAMS Built-in Functions
NAME | FUNCTION | SYNTAX |
1.arc | arc draws a circular arc. | void far arc(int x,int y,int stangle,int endangle,int radius); |
2.circle | circle draws a circle. | void far circle(int x,int y,int radius); |
3.bar | draws a bar. | void far bar(int left,int top,int right,int bottom); |
4.closegraph | shutdown the graphic system. | void far closegraph(void); |
5.ellipse | ellipse draws an elliptical arc. | void far ellipse(int x,int y,int stangle,int endangle,int xradius,int yradius); |
6.floodfill | floodfills a bound region. | void far floodfill(int x,int y,int radius); |
7.getbkcolor | getbkcolor returns the current back ground color. | int far getbkcolor(void); |
8.getgraphmode | getgraphmode returns the current graphic mode. | int far getgraphmode(void); |
9.getmaxcolor | returns the maximum color value. | int far getmaxcolor(void); |
10.getmaxx | returns maximum x screen coordinate. | int far gatmaxx(void); |
11.getmaxy | returns maximum yscreen coordinate. | int far getmaxy(void); |
12.gety | returns the current positions y coordinate. | int far gety(viod); |
13.getx | returns the current positions xcoordinate. | int far getx(void); |
14.detectgraph | determaines graphic driver and mode to use by checking the hardware. | void far detectgraph(int far *graphdriver,int far *graphmode); |
15.fillellipse | fillellipse draws and fill an ellipse. | void far fillellipse(int x,int y,int xradius,int yradius); |
16.getarccoords | gets coordinate of the last call to arc. | void far getarccoords(struct arccoords type far *arccoords); |
17.getcolor | returns the current drawing color. | int far getcolor(void); |
18.getfillpattern | copies a userefined fill pattern into memory. | void far getfillpattern(char far *pattern); |
19.getmaxmode | returns maximum graphics mode number for current driver. | int far getmaxmode(void); |
20.drawpoly | draws the outline of a polygon. | void far drawpoly(int numpoints,int far *polypoints); |
21.fillpoly | fillpoly draws and fills a polygon. | void far fillpoly(int numpoints,int *polypoints); |
22.clearviewpoint | clear the current view port. | void far clearviewport(void); |
23.getpixel | getpixel gets the color of a specified pixel. | unsigned far getpixel(int x,int y); |
24.grapherrormsg | returns a pointer to an error message string. | char *far grapherrormsg(int errorcode); |
25.lineto | draws a line from th current position cp to (x,y). | void far lineto(int x,int y); |
26.line | draws a line between two specified points. | void far line(int x1,int y1,int x2,int y2); |
27.initgraph | initialize the graphic system. | void far initgraph(int far *graphdrive,int far *graphmode,int far *pathtodrive); |
28.rectangle | draws a rectangle. | void far rectangle(int left,int top,int right,int bottom); |
29.putpixel | plots a pixel at a specified point. | void far putpixel(int x,int y,int color); |
30.imagesize | returns the number of bytes required to store a bit image. | Unsigned far imagesize(int left,int top,int right,int bottom); |
31.moveto | Moves the cp to (x,y). | void far moveto(int x,int y); |
32.setcolor | sets the current drawing color. | void far setcolor(int color); |
33.setgraphmode | sets the system to graphics mode,clear the screen. | void far setgraphmode(int mode); |
34.textwidth | returns the width of string in pixels. | int far textwidth(char far *textstring); |
35.textheight | returns the height of string in pixels. | int far textheight(char far *textstring); |
Related Posts : C,
C++,
cg lab,
cg lab programs,
Computer Graphics programs,
programming
Subscribe to:
Post Comments (Atom)
it is very useful!!!
ReplyDeleteNice Post Thanks To Share With Us !
ReplyDelete