summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-12-06 09:37:32 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-07 10:31:22 -0800
commit22aa6fa4ef4d7c28c5dd394e87f3a23ec27ca7bb (patch)
treee3cba4e864a16e150d044884f88ced1a26d44e1e /profile.c
parent3a7f3ba880eeacb6e19aeea3ed55073647cffc20 (diff)
downloadsubsurface-22aa6fa4ef4d7c28c5dd394e87f3a23ec27ca7bb.tar.gz
Add dive computer name to the dive plot
I want to have some way to show multiple dive computers, so start off by adding the name of the current one. So if we change dive computers, we'll see it. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index b225f7357..9fdc204f2 100644
--- a/profile.c
+++ b/profile.c
@@ -2017,6 +2017,12 @@ void plot(struct graphics_context *gc, struct dive *dive, scale_mode_t scale)
cairo_close_path(gc->cr);
cairo_stroke(gc->cr);
+ /* Put the dive computer name in the lower left corner */
+ if (dc->model) {
+ static const text_render_options_t computer = {10, TIME_TEXT, LEFT, MIDDLE};
+ plot_text(gc, &computer, 0, 1, "%s", dc->model);
+ }
+
if (GRAPHS_ENABLED) {
plot_pp_gas_profile(gc, pi);
plot_pp_text(gc, pi);