work
[pspp] / src / output / render.h
index cceea9e72323a95edbef1083ecf2da07740cc844..31046e98fe97dffc5f67a2f5be7607640b81ffbc 100644 (file)
@@ -21,7 +21,7 @@
 #include <stddef.h>
 #include "output/table-provider.h"
 
-struct table_item;
+struct pivot_table;
 
 enum render_line_style
   {
@@ -34,7 +34,7 @@ enum render_line_style
     RENDER_N_LINES
   };
 
-/* Parameters for rendering a table_item to a device.
+/* Parameters for rendering a pivot table to a device.
 
 
    Coordinate system
@@ -100,7 +100,7 @@ struct render_params
        case) or a subregion enclosed by BB.  In the latter case only the part
        of the cell that lies within CLIP should actually be drawn, although BB
        should used to determine the layout of the cell. */
-    void (*draw_cell) (void *aux, const struct table_cell *cell,
+    void (*draw_cell) (void *aux, const struct table_cell *cell, int color_idx,
                        int bb[TABLE_N_AXES][2],
                        int spill[TABLE_N_AXES][2],
                        int clip[TABLE_N_AXES][2]);
@@ -125,12 +125,19 @@ struct render_params
        points.) */
     int min_break[TABLE_N_AXES];
 
+    /* True if the driver supports cell margins.  (If false, the rendering
+       engine will insert a small space betweeen adjacent cells that don't have
+       an intervening rule.)  */
     bool supports_margins;
+
+    /* True if the local language has a right-to-left direction, otherwise
+       false.  (Use render_direction_rtl() to find out.) */
+    bool rtl;
   };
 
 /* An iterator for breaking render_pages into smaller chunks. */
 struct render_pager *render_pager_create (const struct render_params *,
-                                          const struct table_item *);
+                                          const struct pivot_table *);
 void render_pager_destroy (struct render_pager *);
 
 bool render_pager_has_next (const struct render_pager *);