+static void show_one_dive(struct dive *dive, cairo_t *cr, double w, double h)
+{
+ struct graphics_context gc = {
+ .printer = 1,
+ .cr = cr
+ };
+ plot(&gc, w, h, dive);
+}
+
+static void print(int divenr, cairo_t *cr, double x, double y, double w, double h)
+{
+ struct dive *dive;
+
+ dive = get_dive(divenr);
+ if (!dive)
+ return;
+ cairo_save(cr);
+ cairo_translate(cr, x, y);
+
+ /* Dive plot in the upper half */
+ show_one_dive(dive, cr, w, h/2);
+
+ /* Dive information in the lower half */
+
+ cairo_restore(cr);
+}
+