X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fpiechart.c;h=a1986bd3122c532c65a03184004f534abd7f5da4;hb=9105b67fe006fe41c044e3659325594a52d0c899;hp=3fceaf20f5b016bec4d798cdcd298206e87ebd2b;hpb=000e3e8c5818476c3afbc75fad9347aefb6e902a;p=pspp-builds.git diff --git a/src/output/charts/piechart.c b/src/output/charts/piechart.c index 3fceaf20..a1986bd3 100644 --- a/src/output/charts/piechart.c +++ b/src/output/charts/piechart.c @@ -1,7 +1,6 @@ /* PSPP - draws pie charts of sample statistics Copyright (C) 2004 Free Software Foundation, Inc. -Written by John Darrington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -19,17 +18,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "config.h" -#include "piechart.h" -#include "chart.h" +#include + #include #include #include #include -#include "str.h" -#include "value-labels.h" -#include "misc.h" -#include "plot-chart.h" + + +#include +#include + +#include +#include +#include + +#include "minmax.h" + /* Pie charts of course need to know Pi :) */ #ifndef M_PI @@ -66,7 +71,7 @@ piechart_plot(const char *title, const struct slice *slices, int n_slices) const double centre_x = (ch->data_right + ch->data_left ) / 2.0 ; const double centre_y = (ch->data_top + ch->data_bottom ) / 2.0 ; - const double radius = min( + const double radius = MIN( 5.0 / 12.0 * (ch->data_top - ch->data_bottom), 1.0 / 4.0 * (ch->data_right - ch->data_left) );