28 #define CIRCLE_SEGMENTS ( PL_MAXPOLY - 1 )
29 #define DEG_TO_RAD( x ) ( ( x ) * M_PI / 180.0 )
54 PLFLT theta0, theta_step, theta, d_angle;
57 PLFLT cphi, sphi, ctheta, stheta;
61 if ( fabs( d_angle ) >
M_PI * 2.0 )
77 theta_step = d_angle / ( segments - 1 );
80 for ( i = 0; i < segments; i++ )
82 theta = theta0 + theta_step * (
PLFLT) i;
83 ctheta = cos( theta );
84 stheta = sin( theta );
85 xs[i] = x + a * ctheta * cphi - b * stheta * sphi;
86 ys[i] = y + a * ctheta * sphi + b * stheta * cphi;
92 if ( fabs( d_angle ) <
M_PI * 2.0 )
99 plfill( segments, xs, ys );
104 plline( segments, xs, ys );
144 PLINT clpxmi, clpxma, clpymi, clpyma;
148 if ( plsc->dev_arc && plsc->diorot == 0 )
158 arc_info->
x = 0.5 * (
xscl[1] +
xscl[0] );
159 arc_info->
y = 0.5 * (
yscl[1] +
yscl[0] );
160 arc_info->
a = 0.5 * (
xscl[1] -
xscl[0] );
161 arc_info->
b = 0.5 * (
yscl[1] -
yscl[0] );
163 arc_info->
angle1 = angle1;
164 arc_info->
angle2 = angle2;
165 arc_info->
rotate = rotate;