… | |
… | |
13 | { |
13 | { |
14 | rxvt_screen *s; |
14 | rxvt_screen *s; |
15 | Pixmap pm; |
15 | Pixmap pm; |
16 | int w, h; |
16 | int w, h; |
17 | XRenderPictFormat *format; |
17 | XRenderPictFormat *format; |
|
|
18 | bool shared; // true if we don't own it |
18 | |
19 | |
19 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height); |
20 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height); |
20 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); |
21 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); |
21 | static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap |
22 | static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap |
22 | static rxvt_img *new_from_file (const char *filename); // from pixbuf |
23 | static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // from pixbuf |
23 | |
24 | |
24 | ~rxvt_img (); |
25 | ~rxvt_img (); |
25 | |
26 | |
26 | Pixmap steal () |
27 | Pixmap steal () |
27 | { |
28 | { |
28 | Pixmap res = pm; |
29 | shared = true; |
29 | pm = 0; |
|
|
30 | return res; |
30 | return pm; |
31 | } |
31 | } |
32 | |
32 | |
33 | // inplace |
33 | // inplace |
34 | void fill (const rxvt_color &c); |
34 | void fill (const rxvt_color &c); |
35 | void blur (int rh, int rv); |
35 | void blur (int rh, int rv); |
… | |
… | |
39 | |
39 | |
40 | // copy |
40 | // copy |
41 | rxvt_img *copy (); |
41 | rxvt_img *copy (); |
42 | rxvt_img *scale (int new_width, int new_height); |
42 | rxvt_img *scale (int new_width, int new_height); |
43 | rxvt_img *transform (int new_width, int new_height, double matrix[16]); |
43 | rxvt_img *transform (int new_width, int new_height, double matrix[16]); |
|
|
44 | rxvt_img *convert_to (XRenderPictFormat *format); |
44 | }; |
45 | }; |
45 | |
46 | |
46 | #endif |
47 | #endif |
47 | |
48 | |
48 | #endif |
49 | #endif |