From: Linus Torvalds Date: Wed, 21 Sep 2011 00:20:54 +0000 (-0700) Subject: Print out only simplified depth profile X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=368623113c7f457e372bb1c4968fb2445cac62a1;hp=9cfe9aa8cde394aef61be4d50de73562a5ac1c6f;p=ext%2Fsubsurface.git Print out only simplified depth profile None of the colors, nothing like that. Just a gray fill and a plain black depth line. Signed-off-by: Linus Torvalds --- diff --git a/print.c b/print.c index a16ddb7..4848dfa 100644 --- a/print.c +++ b/print.c @@ -23,8 +23,11 @@ static void print(int divenr, cairo_t *cr, double x, double y, double w, double cairo_save(cr); cairo_translate(cr, x, y); - /* Dive plot in the upper half */ - show_one_dive(dive, cr, w, h/2); + /* We actually want to scale the text and the lines now */ + cairo_scale(cr, 0.5, 0.5); + + /* Dive plot in the upper half - note the scaling */ + show_one_dive(dive, cr, w*2, h); /* Dive information in the lower half */ diff --git a/profile.c b/profile.c index 21ddf84..7185822 100644 --- a/profile.c +++ b/profile.c @@ -313,6 +313,13 @@ static void plot_depth_profile(struct graphics_context *gc, struct plot_info *pi for (i = 0; i < pi->nr; i++, entry++) line_to(gc, entry->sec, entry->val); cairo_close_path(gc->cr); + if (gc->printer) { + set_source_rgba(gc, 1, 1, 1, 0.2); + cairo_fill_preserve(cr); + set_source_rgb(gc, 1, 1, 1); + cairo_stroke(cr); + return; + } cairo_fill(gc->cr); /* Now do it again for the velocity colors */