--- rxvt-unicode/src/rxvtimg.h 2012/06/14 17:06:57 1.33 +++ rxvt-unicode/src/rxvtimg.h 2012/06/14 18:19:11 1.36 @@ -17,6 +17,8 @@ Picture src_picture (); public: + typedef double nv; + // *could* also hold the Pixmap itself struct pixref { @@ -68,13 +70,14 @@ void unshare (); // prepare for write void fill (const rgba &c); + void add_alpha (); //void linear_gradient (const XLinearGradient *gradient, const XFixed *stops, const XRenderColor *colors, int nstops); //void radial_gradient (const XRadialGradient *gradient, const XFixed *stops, const XRenderColor *colors, int nstops); //void conical_gradient (const XConicalGradient *gradient, const XFixed *stops, const XRenderColor *colors, int nstops); void brightness (int32_t r, int32_t g, int32_t b, int32_t a); void contrast (int32_t r, int32_t g, int32_t b, int32_t a); - void brightness (double r, double g, double b, double a = 1.) + void brightness (nv r, nv g, nv b, nv a = 1.) { brightness (float_to_component (r), float_to_component (g), @@ -82,7 +85,7 @@ float_to_component (a)); } - void contrast (double r, double g, double b, double a = 1.) + void contrast (nv r, nv g, nv b, nv a = 1.) { contrast (float_to_component (r), float_to_component (g), @@ -95,11 +98,11 @@ rxvt_img *blur (int rh, int rv); rxvt_img *clone (); rxvt_img *sub_rect (int x, int y, int width, int height); - rxvt_img *transform (double matrix[3][3]); + rxvt_img *transform (nv matrix[3][3]); rxvt_img *scale (int new_width, int new_height); - rxvt_img *rotate (int cx, int cy, double phi); + rxvt_img *rotate (int cx, int cy, nv phi); rxvt_img *convert_format (XRenderPictFormat *format, const rgba &bg); - rxvt_img *blend (rxvt_img *img, double factor); + rxvt_img *blend (rxvt_img *img, nv factor = 1.); // egregiuous helper category rxvt_img *replace (rxvt_img *&p)