int y_axis_width, y_axis_height;
PangoRectangle new_chart;
+ cairo_save (cr);
+
acre_font = pango_font_description_new ();
pango_font_description_set_family (acre_font, ACRE_FONT_FAMILY);
pango_font_description_set_absolute_size (acre_font,
acre->chart.y + acre->chart.height +
ACRE_FONT_SIZE + ACRE_PAD);
pango_cairo_show_layout (cr, x_axis_layout);
+
+ cairo_restore (cr);
+}
+
+static void
+_draw_frame_and_ticks (acre_t *acre)
+{
+ cairo_t *cr = acre->cr;
+
+ cairo_save (cr);
+
+ cairo_rectangle (cr,
+ acre->chart.x - 0.5, acre->chart.y - 0.5,
+ acre->chart.width + 1.0, acre->chart.height + 1.0);
+ cairo_set_line_width (cr, 1.0);
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_stroke (cr);
+
+ cairo_restore (cr);
}
/* Draw the plot to the given cairo context within a user-space
_draw_title_and_labels (acre);
- cairo_rectangle (cr,
- acre->chart.x - 0.5, acre->chart.y - 0.5,
- acre->chart.width + 1.0, acre->chart.height + 1.0);
- cairo_set_line_width (cr, 1.0);
- cairo_stroke (cr);
+ _draw_frame_and_ticks (acre);
}
/* Create a new dataset---a collection of (x, y) datapoints. A single