summaryrefslogtreecommitdiffstats
path: root/profile.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-08 17:46:28 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-08 14:19:10 -0700
commitef7ace9926276f401cceb45d546a7134eeea0f00 (patch)
tree7d94c75b3b4a823989e4b77a8c9254b7abb79ccf /profile.h
parentce8d30b938b80c334eb0869650c3c463084ae018 (diff)
downloadsubsurface-ef7ace9926276f401cceb45d546a7134eeea0f00.tar.gz
Plot the temperature Graph
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/profile.h b/profile.h
index d22589c68..62affe04e 100644
--- a/profile.h
+++ b/profile.h
@@ -38,6 +38,7 @@ struct plot_data {
void calculate_max_limits(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);
struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);
+int setup_temperature_limits(struct graphics_context *gc, struct plot_info *pi);
struct ev_select {
char *ev_name;
@@ -83,6 +84,10 @@ int get_maxdepth(struct plot_info *pi);
#define MIDDLE (0)
#define BOTTOM (-1)
+#define SCALEX(gc,x) (((x)-gc->leftx)/(gc->rightx-gc->leftx)*gc->maxx)
+#define SCALEY(gc,y) (((y)-gc->topy)/(gc->bottomy-gc->topy)*gc->maxy)
+#define SCALE(gc,x,y) SCALEX(gc,x),SCALEY(gc,y)
+
#ifdef __cplusplus
}
#endif