ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtimg.h
(Generate patch)

Comparing rxvt-unicode/src/rxvtimg.h (file contents):
Revision 1.23 by root, Thu Jun 7 19:06:26 2012 UTC vs.
Revision 1.25 by root, Fri Jun 8 20:35:43 2012 UTC

5 #define HAVE_IMG 1 5 #define HAVE_IMG 1
6#endif 6#endif
7 7
8#if HAVE_IMG 8#if HAVE_IMG
9 9
10#define float_to_component(d) ((d) * 65535.99) 10#define float_to_component(d) (uint16_t)((d) * 65535.99)
11 11
12#include <X11/extensions/Xrender.h> 12#include <X11/extensions/Xrender.h>
13 13
14class rxvt_img 14class rxvt_img
15{ 15{
38 XRenderPictFormat *format; 38 XRenderPictFormat *format;
39 39
40 rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int x, int y, int width, int height, int repeat = RepeatNormal); 40 rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int x, int y, int width, int height, int repeat = RepeatNormal);
41 rxvt_img (const rxvt_img &img); 41 rxvt_img (const rxvt_img &img);
42 42
43 //rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap);
44 static rxvt_img *new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb); // from pixbuf 43 static rxvt_img *new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb); // from pixbuf
45 static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // via pixbuf 44 static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // via pixbuf
46 static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap 45 static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap
47 46
48 ~rxvt_img (); 47 ~rxvt_img ();
65 this->repeat = repeat; 64 this->repeat = repeat;
66 } 65 }
67 66
68 void unshare (); // prepare for write 67 void unshare (); // prepare for write
69 void fill (const rxvt_color &c); 68 void fill (const rxvt_color &c);
70 void brightness (unsigned short r, unsigned short g, unsigned short b, unsigned short a); 69 void brightness (uint16_t r, uint16_t g, uint16_t b, uint16_t a);
71 void contrast (unsigned short r, unsigned short g, unsigned short b, unsigned short a); 70 void contrast (uint16_t r, uint16_t g, uint16_t b, uint16_t a);
72 71
73 void brightness (double r, double g, double b, double a = 1.) 72 void brightness (double r, double g, double b, double a = 1.)
74 { 73 {
75 brightness (float_to_component (r), 74 brightness (float_to_component (r),
76 float_to_component (g), 75 float_to_component (g),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines