summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-11-21 12:35:42 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-11-21 12:35:42 -0800
commit0d1f8f9a5db6f3433d8deb6cdab7ffa3ebc10a87 (patch)
tree9711ce94b193132fb3eee97ab646a97a07cd4ea2 /profile.c
parent0f139718697035fa8e1b26f908403ad27bb36554 (diff)
downloadsubsurface-0d1f8f9a5db6f3433d8deb6cdab7ffa3ebc10a87.tar.gz
Don't colorize the pressure plot when printing
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/profile.c b/profile.c
index 247a9c487..b01514a57 100644
--- a/profile.c
+++ b/profile.c
@@ -622,12 +622,16 @@ static void set_sac_color(struct graphics_context *gc, int sac, int avg_sac)
int sac_index = 0;
int delta = sac - avg_sac + 7000;
- sac_index = delta / 2000;
- if (sac_index < 0)
- sac_index = 0;
- if (sac_index > SAC_COLORS - 1)
- sac_index = SAC_COLORS - 1;
- set_source_rgb_struct(gc, &sac_color[sac_index]);
+ if (!gc->printer) {
+ sac_index = delta / 2000;
+ if (sac_index < 0)
+ sac_index = 0;
+ if (sac_index > SAC_COLORS - 1)
+ sac_index = SAC_COLORS - 1;
+ set_source_rgb_struct(gc, &sac_color[sac_index]);
+ } else {
+ set_source_rgb(gc, 1.0, 1.0, 1.0);
+ }
}
/* calculate the current SAC in ml/min and convert to int */