Update all #include directives to the currently preferred style.
[pspp-builds.git] / src / output / charts / piechart-cairo.c
index 501c0bd466adb7cf2d391ba0ec6d86d5285afcd0..9e55c56f46a0b8d83ef4b0cf2b9ad4489f1c8fec 100644 (file)
@@ -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
 
 #include <config.h>
 
-#include <output/charts/piechart.h>
+#include "output/charts/piechart.h"
 
 #include <math.h>
 
-#include <output/cairo-chart.h>
+#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,