diff options
Diffstat (limited to 'display.h')
-rw-r--r-- | display.h | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -1,18 +1,26 @@ #ifndef DISPLAY_H #define DISPLAY_H -#include <cairo.h> - #ifdef __cplusplus extern "C" { +#else +#if __STDC_VERSION__ >= 199901L +#include <stdbool.h> +#else +typedef int bool; +#endif #endif #define SCALE_SCREEN 1.0 -#define SCALE_PRINT (1.0 / get_screen_dpi()) +#warning "PORT THE get_screen_dpi to Qt" +#define SCALE_PRINT 1.0 +//#define SCALE_PRINT (1.0 / get_screen_dpi()) extern void repaint_dive(void); extern void do_print(void); -extern gdouble get_screen_dpi(void); + +// Commented out because I don't know how to get the dpi on a paint device yet. +// extern gdouble get_screen_dpi(void); /* Plot info with smoothing, velocity indication * and one-, two- and three-minute minimums and maximums */ @@ -24,11 +32,16 @@ struct plot_info { int mintemp, maxtemp; double endtempcoord; double maxpp; - gboolean has_ndl; + bool has_ndl; struct plot_data *entry; }; /* +// I'm not sure if this is needed anymore - but keeping this here +// so I wont break stuff trying to redo the well. +*/ + +/* * Cairo scaling really is horribly horribly mis-designed. * * Which is sad, because I really like Cairo otherwise. But @@ -38,8 +51,6 @@ struct plot_info { */ struct graphics_context { int printer; - cairo_t *cr; - cairo_rectangle_t drawing_area; double maxx, maxy; double leftx, rightx; double topy, bottomy; @@ -61,7 +72,7 @@ struct options { enum { PRETTY, TABLE, TWOPERPAGE } type; int print_selected; int color_selected; - gboolean notes_up; + bool notes_up; int profile_height, notes_height, tanks_height; }; |