getarccords() function
Declaration of getarccords() function
void getarccoords(struct arccoordstype *var);
getarccoords function is used to get coordinates of arc which is drawn most recently. arccoords type is a predefined structure which is defined as follows:
struct arccoordstype
{
int x, y; /* center point of arc */
int xstart, ystart; /* start position */
int xend, yend; /* end position */
};
address of a structure variable of type arccoordstype is passed to function getarccoords.
C program of getarccoords
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
main()
{
int gd = DETECT, gm;
struct arccoordstype a;
char arr[100];
initgraph(&gd, &gm,"C:\\ TurboC3\\BGI"); arc(250,200,0,90,100);
getarccoords(&a);
sprintf(arr,"(%d, %d)",a.xstart,a.ystart); outtextxy(360,195,arr);
sprintf(arr,"(%d, %d)",a.xend,a.yend);
outtextxy(245,85,arr);
getch();
closegraph();
return 0;
}