Use GDK methods to retrieve the actual screen DPI

gtk-gui.c:
+ added the method get_screen_dpi() that uses a simple
formula to retrieve the actual screen DPI
display.h:
+ use get_screen_dpi() in the SCALE_PRINT macro

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2013-02-06 01:10:40 +02:00 committed by Dirk Hohndel
parent 6bec608ea0
commit 30466b9abb
2 changed files with 12 additions and 2 deletions

View file

@ -3,12 +3,12 @@
#include <cairo.h>
#define DPI_SCREEN 72.0
#define SCALE_SCREEN 1.0
#define SCALE_PRINT (1.0 / DPI_SCREEN)
#define SCALE_PRINT (1.0 / get_screen_dpi())
extern void repaint_dive(void);
extern void do_print(void);
extern gdouble get_screen_dpi(void);
/* Plot info with smoothing, velocity indication
* and one-, two- and three-minute minimums and maximums */