X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fpiechart-cairo.c;h=9e55c56f46a0b8d83ef4b0cf2b9ad4489f1c8fec;hb=f1cb9492fb8af446458607158c9cd01ad85a6768;hp=501c0bd466adb7cf2d391ba0ec6d86d5285afcd0;hpb=dfd1972f7bcb550a4fc3b05dbe7e71d12334b0a7;p=pspp diff --git a/src/output/charts/piechart-cairo.c b/src/output/charts/piechart-cairo.c index 501c0bd466..9e55c56f46 100644 --- a/src/output/charts/piechart-cairo.c +++ b/src/output/charts/piechart-cairo.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,11 +16,11 @@ #include -#include +#include "output/charts/piechart.h" #include -#include +#include "output/cairo-chart.h" #include "gl/minmax.h" @@ -81,11 +81,11 @@ xrchart_draw_piechart (const struct chart_item *chart_item, cairo_t *cr, const double segment_angle = pie->slices[i].magnitude / total_magnitude * 2 * M_PI ; - const double label_x = centre_x - - radius * sin(angle + segment_angle/2.0); + const double label_x = centre_x + + radius * cos (angle + segment_angle/2.0); const double label_y = centre_y + - radius * cos(angle + segment_angle/2.0); + radius * sin (angle + segment_angle/2.0); /* Fill the segment */ draw_segment (cr,