summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-06 10:55:18 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-06 10:55:18 -0700
commit70352c3962cf3b4379590326cdc489ac0543f7e9 (patch)
treef19231854c95ef2d509c46213ff11eb07ef4c057 /profile.c
parentb01cc72ef5ceefd09d5ba1bf80e82a1c78e6a477 (diff)
downloadsubsurface-70352c3962cf3b4379590326cdc489ac0543f7e9.tar.gz
Remove lots of ifdef'ed out code from GTK/glib version
There's still a ton more left, but this is a start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/profile.c b/profile.c
index 0bb75579c..656c6bb6a 100644
--- a/profile.c
+++ b/profile.c
@@ -8,9 +8,6 @@
#include "dive.h"
#include "display.h"
-#if USE_GTK_UI
-#include "display-gtk.h"
-#endif
#include "divelist.h"
#include "profile.h"
@@ -28,24 +25,6 @@ static struct plot_data *last_pi_entry = NULL;
#define cairo_set_line_width_scaled(cr, w) \
cairo_set_line_width((cr), (w) * plot_scale);
-#if USE_GTK_UI
-
-/* keep the last used gc around so we can invert the SCALEX calculation in
- * order to calculate a time value for an x coordinate */
-static struct graphics_context last_gc;
-int x_to_time(double x)
-{
- int seconds = (x - last_gc.drawing_area.x) / last_gc.maxx * (last_gc.rightx - last_gc.leftx) + last_gc.leftx;
- return (seconds > 0) ? seconds : 0;
-}
-
-/* x offset into the drawing area */
-int x_abs(double x)
-{
- return x - last_gc.drawing_area.x;
-}
-#endif /* USE_GTK_UI */
-
/* debugging tool - not normally used */
static void dump_pi (struct plot_info *pi)
{
@@ -205,54 +184,6 @@ void setup_pp_limits(struct graphics_context *gc)
gc->bottomy = -gc->topy / 20;
}
-
-#if 0
-
-static void plot_smoothed_profile(struct graphics_context *gc, struct plot_info *pi)
-{
- int i;
- struct plot_data *entry = pi->entry;
-
- set_source_rgba(gc, SMOOTHED);
- move_to(gc, entry->sec, entry->smoothed);
- for (i = 1; i < pi->nr; i++) {
- entry++;
- line_to(gc, entry->sec, entry->smoothed);
- }
- cairo_stroke(gc->cr);
-}
-
-static void plot_minmax_profile_minute(struct graphics_context *gc, struct plot_info *pi,
- int index)
-{
- int i;
- struct plot_data *entry = pi->entry;
-
- set_source_rgba(gc, MINUTE);
- move_to(gc, entry->sec, entry->min[index]->depth);
- for (i = 1; i < pi->nr; i++) {
- entry++;
- line_to(gc, entry->sec, entry->min[index]->depth);
- }
- for (i = 1; i < pi->nr; i++) {
- line_to(gc, entry->sec, entry->max[index]->depth);
- entry--;
- }
- cairo_close_path(gc->cr);
- cairo_fill(gc->cr);
-}
-
-static void plot_minmax_profile(struct graphics_context *gc, struct plot_info *pi)
-{
- if (gc->printer)
- return;
- plot_minmax_profile_minute(gc, pi, 2);
- plot_minmax_profile_minute(gc, pi, 1);
- plot_minmax_profile_minute(gc, pi, 0);
-}
-
-#endif /* USE_GTK_UI */
-
int get_cylinder_pressure_range(struct graphics_context *gc)
{
gc->leftx = 0;