outtextxy() function in CThe header file graphics.h contains outtextxy() function which displays the text or string at a specified point (x, y) on the screen. Syntax : void outtextxy(int x, int y, char *string); where, x, y are coordinates of the point and, third argument contains the address of string to be displayed. Exam
1 min read
setlinestyle() function in CThe header file graphics.h contains setlinestyle() function which sets the style for all lines drawn by line, lineto, rectangle, drawpoly, and so on. Syntax : void setlinestyle(int linestyle, unsigned upattern, int thickness); Examples : Input : x = 200, y = 100 Output : x and y are initialized as (
2 min read
sector() function in CThe header file graphics.h contains sector() function which draws and fills an elliptical pie slice with (x, y) as center, (s_angle, e_angle) as starting and ending angle and (x_radius, y_radius) as x and y radius of sector. Syntax : void sector(int x, int y, int s_angle, int e_angle, int x_radius,
2 min read
bar3d() function in C graphicsThe header file graphics.h contains bar3d() function which is used to draw a 2-dimensional, rectangular filled in bar . Coordinates of left top and right bottom corner of bar are required to draw the bar. Syntax : void bar3d(int left, int top, int right, int bottom, int depth, int topflag); where, l
2 min read
drawpoly() function in CThe 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, int *polypoints ); where, number indicates (n + 1) number of points where n is the number of vertices in a polygon. polypoints p
2 min read
putpixel() function in CThe 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, int color); where, (x, y) is the location at which pixel is to be put , and color specifies the color of the pixel. Explanation : A RED color pixel
2 min read
imagesize() function in CThe 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 top, int right, int bottom); where, left, top, right, and bottom define the area of the screen in which image is stored. Below is th
2 min read
fillpoly() function in CThe header file graphics.h contains fillpoly() function which is used to draw and fill a polygon i.e. triangle, rectangle, pentagon, hexagon etc. It require same arguments as drawpoly(). Syntax : void fillpoly( int number, int *polypoints ); where, number indicates (n + 1) number of points where, n
3 min read
fillellipse() function in CThe header file graphics.h contains fillellipse() function which draws and fills an ellipse with center at (x, y) and (x_radius, y_radius) as x and y radius of ellipse. Syntax : void fillellipse(int x, int y, int x_radius, int y_radius); where, (x, y) is center of the ellipse. (x_radius, y_radius) a
1 min read
bar() function in C graphicsThe header file graphics.h contains bar() function which is used to draw a 2-dimensional, rectangular filled in bar. Syntax : void bar(int left, int top, int right, int bottom); where, left specifies the X-coordinate of top left corner, top specifies the Y-coordinate of top left corner, right specif
2 min read