summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-12-06 10:01:16 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-07 10:31:26 -0800
commit0d1f396f3ae989f9a6ceac923be0c5ba45ef035f (patch)
tree438e380886b308f4329a61d5c6f178797cb0ae42 /display.h
parent22aa6fa4ef4d7c28c5dd394e87f3a23ec27ca7bb (diff)
downloadsubsurface-0d1f396f3ae989f9a6ceac923be0c5ba45ef035f.tar.gz
Move 'plot_info' into 'struct graphics_context'
.. and then allocate just the plot-info entry array dynamically. We want to have a longer lifetime for the basic plot_info data structure, because we want to do computer selection and maximum time/depth/temperature computations *before* we start plotting anything, and before we allocate the plot entry array. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display.h')
-rw-r--r--display.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/display.h b/display.h
index 6eea822aa..6f9f6854c 100644
--- a/display.h
+++ b/display.h
@@ -10,6 +10,19 @@
extern void repaint_dive(void);
extern void do_print(void);
+/* Plot info with smoothing, velocity indication
+ * and one-, two- and three-minute minimums and maximums */
+struct plot_info {
+ int nr;
+ int maxtime;
+ int meandepth, maxdepth;
+ int endpressure, maxpressure;
+ int mintemp, maxtemp, endtemp;
+ double endtempcoord;
+ gboolean has_ndl;
+ struct plot_data *entry;
+};
+
/*
* Cairo scaling really is horribly horribly mis-designed.
*
@@ -26,7 +39,7 @@ struct graphics_context {
double leftx, rightx;
double topy, bottomy;
unsigned int maxtime;
- void *plot_info;
+ struct plot_info pi;
};
typedef enum { SC_SCREEN, SC_PRINT } scale_mode_t;