]> git.tdb.fi Git - ext/subsurface.git/blob - display.h
Fix crash when editing weight system info
[ext/subsurface.git] / display.h
1 #ifndef DISPLAY_H
2 #define DISPLAY_H
3
4 #include <cairo.h>
5
6 extern void repaint_dive(void);
7 extern void do_print(void);
8
9 /*
10  * Cairo scaling really is horribly horribly mis-designed.
11  *
12  * Which is sad, because I really like Cairo otherwise. But
13  * the fact that the line width is scaled with the same scale
14  * as the coordinate system is a f*&%ing disaster. So we
15  * can't use it, and instead have this butt-ugly wrapper thing..
16  */
17 struct graphics_context {
18         int printer;
19         cairo_t *cr;
20         double maxx, maxy;
21         double leftx, rightx;
22         double topy, bottomy;
23 };
24
25 extern void plot(struct graphics_context *gc, cairo_rectangle_int_t *drawing_area, struct dive *dive);
26 extern void init_profile_background(struct graphics_context *gc);
27 extern void attach_tooltip(int x, int y, int w, int h, const char *text);
28
29 #endif