--- rxvt-unicode/src/rxvtimg.h 2012/06/07 17:21:56 1.22 +++ rxvt-unicode/src/rxvtimg.h 2012/06/08 20:35:43 1.25 @@ -7,7 +7,7 @@ #if HAVE_IMG -#define float_to_component(d) ((d) * 65535.99) +#define float_to_component(d) (uint16_t)((d) * 65535.99) #include @@ -40,9 +40,9 @@ rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int x, int y, int width, int height, int repeat = RepeatNormal); rxvt_img (const rxvt_img &img); - //rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); + static rxvt_img *new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb); // from pixbuf + static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // via pixbuf static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap - static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // from pixbuf ~rxvt_img (); @@ -66,8 +66,8 @@ void unshare (); // prepare for write void fill (const rxvt_color &c); - void brightness (unsigned short r, unsigned short g, unsigned short b, unsigned short a); - void contrast (unsigned short r, unsigned short g, unsigned short b, unsigned short a); + void brightness (uint16_t r, uint16_t g, uint16_t b, uint16_t a); + void contrast (uint16_t r, uint16_t g, uint16_t b, uint16_t a); void brightness (double r, double g, double b, double a = 1.) { @@ -85,8 +85,6 @@ float_to_component (a)); } - bool render_pixbuf (GdkPixbuf *pixbuf, int src_x, int src_y, int width, int height, int dst_x, int dst_y); - // copy rxvt_img *reify (); // make x, y 0, make real width/height rxvt_img *blur (int rh, int rv);