summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-09 15:42:38 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-09 17:50:06 -0700
commite62eb58ab5004fdeaee56b986d7f9b4c3f23619a (patch)
treedc5d62106949f93b28aa3a4af22b7ddd60c8eba3 /profile.c
parentd6d1a10195e1d14bafb5987d5f7b8e776a82b4be (diff)
downloadsubsurface-e62eb58ab5004fdeaee56b986d7f9b4c3f23619a.tar.gz
Plotting cylinder pressure text.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/profile.c b/profile.c
index 67f83f0a6..15fc2a920 100644
--- a/profile.c
+++ b/profile.c
@@ -470,55 +470,6 @@ int get_local_sac(struct plot_data *entry1, struct plot_data *entry2, struct div
#if USE_GTK_UI
-
-static void plot_pressure_value(struct graphics_context *gc, int mbar, int sec,
- int xalign, int yalign)
-{
- int pressure;
- const char *unit;
-
- pressure = get_pressure_units(mbar, &unit);
- text_render_options_t tro = {PRESSURE_TEXT_SIZE, PRESSURE_TEXT, xalign, yalign};
- plot_text(gc, &tro, sec, mbar, "%d %s", pressure, unit);
-}
-
-static void plot_cylinder_pressure_text(struct graphics_context *gc, struct plot_info *pi)
-{
- int i;
- int mbar, cyl;
- int seen_cyl[MAX_CYLINDERS] = { FALSE, };
- int last_pressure[MAX_CYLINDERS] = { 0, };
- int last_time[MAX_CYLINDERS] = { 0, };
- struct plot_data *entry;
-
- if (!get_cylinder_pressure_range(gc, pi))
- return;
-
- cyl = -1;
- for (i = 0; i < pi->nr; i++) {
- entry = pi->entry + i;
- mbar = GET_PRESSURE(entry);
-
- if (!mbar)
- continue;
- if (cyl != entry->cylinderindex) {
- cyl = entry->cylinderindex;
- if (!seen_cyl[cyl]) {
- plot_pressure_value(gc, mbar, entry->sec, LEFT, BOTTOM);
- seen_cyl[cyl] = TRUE;
- }
- }
- last_pressure[cyl] = mbar;
- last_time[cyl] = entry->sec;
- }
-
- for (cyl = 0; cyl < MAX_CYLINDERS; cyl++) {
- if (last_time[cyl]) {
- plot_pressure_value(gc, last_pressure[cyl], last_time[cyl], CENTER, TOP);
- }
- }
-}
-
static void plot_deco_text(struct graphics_context *gc, struct plot_info *pi)
{
if (prefs.profile_calc_ceiling) {