histogram tick drawing - added format generation for optimum tick drawing
[pspp] / src / output / cairo-chart.h
index 0864d7e0142e00b45c95b2cec86c5d9b74ddd95b..116a8c990110be01d1e21a900874e18823a703c9 100644 (file)
@@ -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
@@ -74,7 +74,7 @@ void xrchart_geometry_init (cairo_t *, struct xrchart_geometry *,
                             double width, double length);
 void xrchart_geometry_free (cairo_t *, struct xrchart_geometry *);
 
-#define XRCHART_N_COLOURS 9
+#define XRCHART_N_COLOURS 27
 extern const struct xrchart_colour data_colour[];
 
 enum tick_orientation
@@ -118,12 +118,12 @@ void xrchart_write_title (cairo_t *, const struct xrchart_geometry *,
 
 /* Set the scale for the abscissa */
 void xrchart_write_xscale (cairo_t *, struct xrchart_geometry *,
-                           double min, double max, int ticks);
+                           double min, double max);
 
 
 /* Set the scale for the ordinate */
 void xrchart_write_yscale (cairo_t *, struct xrchart_geometry *,
-                           double smin, double smax, int ticks);
+                           double smin, double smax);
 
 void xrchart_write_xlabel (cairo_t *, const struct xrchart_geometry *,
                            const char *label) ;
@@ -165,6 +165,8 @@ void xrchart_draw_roc (const struct chart_item *, cairo_t *,
                        struct xrchart_geometry *);
 void xrchart_draw_piechart (const struct chart_item *, cairo_t *,
                             struct xrchart_geometry *);
+void xrchart_draw_barchart (const struct chart_item *, cairo_t *,
+                            struct xrchart_geometry *);
 void xrchart_draw_histogram (const struct chart_item *, cairo_t *,
                              struct xrchart_geometry *);
 void xrchart_draw_np_plot (const struct chart_item *, cairo_t *,
@@ -173,6 +175,12 @@ void xrchart_draw_scree (const struct chart_item *, cairo_t *,
                          struct xrchart_geometry *);
 void xrchart_draw_spreadlevel (const struct chart_item *, cairo_t *,
                          struct xrchart_geometry *);
+void xrchart_draw_scatterplot (const struct chart_item *, cairo_t *,
+                         struct xrchart_geometry *);
 
+/* Get the width and height of rendered label text */
+void xrchart_text_extents (cairo_t *cr, const struct xrchart_geometry *geom,
+                          const char *utf8,
+                          double *width, double *height);
 
 #endif /* output/cairo-chart.h */