Is there a way i can modify the Bresenham circle algorythm in a way so that it actually draws arcs with specified start and end angle instead of complete circles? the algorythm in c is like this
void DrawCircle(int xM,int yM,int radius)
{
int f = 1 - radius;
int ddF_x = 1;
int ddF_y = -2 * radius;
int x = 0;
int y = radius;
//Bottom middle
XDrawPoint(display,win,gc,xM,yM + radius);
//Top Middle
XDrawPoint(display,win,gc,xM,yM - radius);
//Right Middle
XDrawPoint(display,win,gc,xM + radius,yM);
//Left Middle
XDrawPoint(display,win,gc,xM - radius ,yM);
while( x<y )
{
if(f >= 0)
{
y--;
ddF_y += 2;
f += ddF_y;
}
x++;
ddF_x += 2;
f += ddF_x;
//Lower Right
XDrawPoint(display,win,gc,xMidPoint+x,yMidPoint+y);
XDrawPoint(display,win,gc,xMidPoint+y,yMidPoint+x);
//Lower Left
XDrawPoint(display,win,gc,xMidPoint-x,yMidPoint+y);
XDrawPoint(display,win,gc,xMidPoint-y,yMidPoint+x);
//Top Right
XDrawPoint(display,win,gc,xM+x,yM-y);
XDrawPoint(display,win,gc,xMidPoint+y,yMidPoint-x);
//Top Left
XDrawPoint(display,win,gc,xMidPoint-x,yMidPoint-y);
XDrawPoint(display,win,gc,xMidPoint-y,yMidPoint-x);
}
}