47
50
int xb = x+w/2+int(w*cos(a2/180.0*M_PI));
48
51
int yb = y+h/2-int(h*sin(a2/180.0*M_PI));
49
52
Arc(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb);
50
#elif defined(__APPLE__)
53
#elif defined(__APPLE_QD__)
51
54
Rect r; r.left=x; r.right=x+w; r.top=y; r.bottom=y+h;
52
55
a1 = a2-a1; a2 = 450-a2;
53
56
FrameArc(&r, (short int)a2, (short int)a1);
57
#elif defined(__APPLE_QUARTZ__)
58
a1 = (-a1)/180.0f*M_PI; a2 = (-a2)/180.0f*M_PI;
59
float cx = x + 0.5f*w - 0.5f, cy = y + 0.5f*h - 0.5f;
61
CGContextSaveGState(fl_gc);
62
CGContextTranslateCTM(fl_gc, cx, cy);
63
CGContextScaleCTM(fl_gc, w-1.0f, h-1.0f);
64
CGContextAddArc(fl_gc, 0, 0, 0.5, a1, a2, 1);
65
CGContextRestoreGState(fl_gc);
67
float r = (w+h)*0.25f-0.5f;
68
CGContextAddArc(fl_gc, cx, cy, r, a1, a2, 1);
70
CGContextStrokePath(fl_gc);
55
72
XDrawArc(fl_display, fl_window, fl_gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64));
66
83
int yb = y+h/2-int(h*sin(a2/180.0*M_PI));
67
84
SelectObject(fl_gc, fl_brush());
68
85
Pie(fl_gc, x, y, x+w, y+h, xa, ya, xb, yb);
69
#elif defined(__APPLE__)
86
#elif defined(__APPLE_QD__)
70
87
Rect r; r.left=x; r.right=x+w; r.top=y; r.bottom=y+h;
71
88
a1 = a2-a1; a2 = 450-a2;
72
89
PaintArc(&r, (short int)a2, (short int)a1);
90
#elif defined(__APPLE_QUARTZ__)
91
a1 = (-a1)/180.0f*M_PI; a2 = (-a2)/180.0f*M_PI;
92
float cx = x + 0.5f*w - 0.5f, cy = y + 0.5f*h - 0.5f;
94
CGContextSaveGState(fl_gc);
95
CGContextTranslateCTM(fl_gc, cx, cy);
96
CGContextScaleCTM(fl_gc, w, h);
97
CGContextAddArc(fl_gc, 0, 0, 0.5, a1, a2, 1);
98
CGContextAddLineToPoint(fl_gc, 0, 0);
99
CGContextClosePath(fl_gc);
100
CGContextRestoreGState(fl_gc);
102
float r = (w+h)*0.25f;
103
CGContextAddArc(fl_gc, cx, cy, r, a1, a2, 1);
104
CGContextAddLineToPoint(fl_gc, cx, cy);
105
CGContextClosePath(fl_gc);
107
CGContextFillPath(fl_gc);
74
109
XFillArc(fl_display, fl_window, fl_gc, x,y,w,h, int(a1*64),int((a2-a1)*64));
79
// End of "$Id: fl_arci.cxx,v 1.4.2.5.2.5 2004/04/11 04:38:59 easysw Exp $".
114
// End of "$Id: fl_arci.cxx,v 1.4.2.5.2.9 2004/08/27 00:22:28 matthiaswm Exp $".