cairo-chart.c: new struct xrchart_axis
[pspp] / src / output / cairo-chart.h
index 1a23dd179329cde657b12a98cd6c5f1ef1c8b05b..5e8123ed1a6617408522043c9f0789aefc2818b8 100644 (file)
@@ -31,16 +31,20 @@ struct xrchart_colour
     uint8_t blue;
   };
 
+struct xrchart_axis
+{
+  int data_max;
+  int data_min;
+
+  double scale;
+  double min;
+  double max;
+};
+
 /* The geometry of a chart. */
 struct xrchart_geometry
   {
-    int data_top;
-    int data_right;
-    int data_bottom;
-    int data_left;
-
     int abscissa_top;
-
     int ordinate_right;
 
     int title_bottom;
@@ -57,12 +61,9 @@ struct xrchart_geometry
     struct xrchart_colour fill_colour;
 
     /* Stuff particular to cartesians and boxplots. */
-    double ordinate_scale;
-    double abscissa_scale;
-    double x_min;
-    double x_max;
-    double y_min;
-    double y_max;
+    struct xrchart_axis axis[2];
+
+    /* True iff a path is currently being drawn */
     bool in_path;
   };
 
@@ -75,8 +76,8 @@ extern const struct xrchart_colour data_colour[];
 
 enum tick_orientation
   {
-    TICK_ABSCISSA=0,
-    TICK_ORDINATE
+    SCALE_ABSCISSA=0,
+    SCALE_ORDINATE
   };
 
 enum xrmarker_type