Skip to content

Tag Archives: c-graphics

The header file graphics.h contains textheight() function which returns the height of input string in pixels. Syntax : int textheight(char *string); Example : Input :… Read More
The header file graphics.h contains imagesize() function which returns the number of bytes required to store a bit-image. Syntax : unsigned int imagesize(int left, int… Read More
The header file graphics.h contains setcolor() function which is used to set the current drawing color to the new color. Syntax : void setcolor(int color);… Read More
The header file graphics.h contains getpixel() function which returns the color of pixel present at location (x, y). Syntax : int getpixel(int x, int y);… Read More
The header file graphics.h contains getmaxcolor() function, which returns maximum color value for current graphics mode and driver. As color numbering starts from zero, total… Read More
The header file graphics.h contains getbkcolor() function which returns the current background color. Syntax : int getbkcolor(); As getbkcolor() returns an integer value corresponding to… Read More
The header file graphics.h contains getarccoords() function which is used to get coordinates of arc which is drawn most recently. arccoordstype is a predefined structure… Read More
The header file graphics.h contains putpixel() function which plots a pixel at location (x, y) of specified color. Syntax : void putpixel(int x, int y,… Read More
The header file graphics.h contains drawpoly() function which is used to draw polygons i.e. triangle, rectangle, pentagon, hexagon etc. Syntax : void drawpoly( int number,… Read More
The header file graphics.h contains closegraph() function which closes the graphics mode, deallocates all memory allocated by graphics system and restores the screen to the… Read More
The header file graphics.h contains cleardevice() function which clears the screen in graphics mode and sets the current position to (0,0). Clearing the screen consists… Read More
The header file graphics.h contains moverel() function which moves a point from the current position(x_pos1, y_pos1) to a point that is at a relative distance… Read More