/*
* elarc(dst,c,a,b,t,src,sp,alpha,phi)
* draws the part of an ellipse between rays at angles alpha and alpha+phi
* measured counterclockwise from the positive x axis. other
* arguments are as for ellipse(dst,c,a,b,t,src,sp)
*/
static
Point corners[] = {
{1,1},
{-1,1},
{-1,-1},
{1,-1}
};
/*
* make a "wedge" mask covering the desired angle and contained in
* a surrounding square; draw a full ellipse; intersect that with the
* wedge to make a mask through which to copy src to dst.
*/
void
memarc(Memimage *dst, Point c, int a, int b, int t, Memimage *src, Point sp, int alpha, int phi, int op)
{
int i, w, beta, tmp, c1, c2, m, m1;
Rectangle rect;
Point p, bnd[8];
Memimage *wedge, *figure, *mask;