X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcairo-chart.h;h=18c242efcebd0c779f74e9b4cba3f540f0256140;hb=78a43b3fd07c601dea27f0568727f515d39a2153;hp=646b1cc3d7e97eaa49d86338a1d6eb2b7b63e2e8;hpb=0343d5554074609ed2907035febd9f49f809b6a8;p=pspp diff --git a/src/output/cairo-chart.h b/src/output/cairo-chart.h index 646b1cc3d7..18c242efce 100644 --- a/src/output/cairo-chart.h +++ b/src/output/cairo-chart.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2011 Free Software Foundation, Inc. + Copyright (C) 2009, 2011, 2015 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 @@ -22,7 +22,8 @@ #include #include "libpspp/compiler.h" -struct chart_item; +struct cell_color; +struct chart; struct xrchart_colour { @@ -117,13 +118,12 @@ void xrchart_write_title (cairo_t *, const struct xrchart_geometry *, PRINTF_FORMAT (3, 4); /* Set the scale for the abscissa */ -void xrchart_write_xscale (cairo_t *, struct xrchart_geometry *, - double min, double max, int ticks); - +bool xrchart_write_xscale (cairo_t *, struct xrchart_geometry *, + double min, double max) WARN_UNUSED_RESULT; /* Set the scale for the ordinate */ -void xrchart_write_yscale (cairo_t *, struct xrchart_geometry *, - double smin, double smax, int ticks); +bool xrchart_write_yscale (cairo_t *, struct xrchart_geometry *, + double smin, double smax) WARN_UNUSED_RESULT; void xrchart_write_xlabel (cairo_t *, const struct xrchart_geometry *, const char *label) ; @@ -159,20 +159,42 @@ void xrchart_line (cairo_t *, const struct xrchart_geometry *, double limit1, double limit2, enum xrchart_dim lim_dim); /* Drawing various kinds of charts. */ -void xrchart_draw_boxplot (const struct chart_item *, cairo_t *, +void xrchart_draw_boxplot (const struct chart *, cairo_t *, struct xrchart_geometry *); -void xrchart_draw_roc (const struct chart_item *, cairo_t *, +void xrchart_draw_roc (const struct chart *, cairo_t *, struct xrchart_geometry *); -void xrchart_draw_piechart (const struct chart_item *, cairo_t *, +void xrchart_draw_piechart (const struct chart *, cairo_t *, + struct xrchart_geometry *); +void xrchart_draw_barchart (const struct chart *, cairo_t *, struct xrchart_geometry *); -void xrchart_draw_histogram (const struct chart_item *, cairo_t *, +void xrchart_draw_histogram (const struct chart *, cairo_t *, struct xrchart_geometry *); -void xrchart_draw_np_plot (const struct chart_item *, cairo_t *, +void xrchart_draw_np_plot (const struct chart *, cairo_t *, struct xrchart_geometry *); -void xrchart_draw_scree (const struct chart_item *, cairo_t *, +void xrchart_draw_scree (const struct chart *, cairo_t *, + struct xrchart_geometry *); +void xrchart_draw_spreadlevel (const struct chart *, cairo_t *, struct xrchart_geometry *); -void xrchart_draw_spreadlevel (const struct chart_item *, cairo_t *, +void xrchart_draw_scatterplot (const struct chart *, cairo_t *, struct xrchart_geometry *); +void xr_draw_chart (const struct chart *, cairo_t *, + double width, double height); + +cairo_surface_t *xr_draw_image_chart (const struct chart *, + const struct cell_color *fg, + const struct cell_color *bg); +char *xr_write_png_image (cairo_surface_t *, + const char *file_name_template, int number); + +char *xr_draw_png_chart (const struct chart *, + const char *file_name_template, int number, + const struct cell_color *fg, + const struct cell_color *bg); + +char *xr_draw_eps_chart (const struct chart *, + const char *file_name_template, int number, + const struct cell_color *fg, + const struct cell_color *bg); #endif /* output/cairo-chart.h */