--- rxvt-unicode/src/rxvtimg.h 2012/06/16 15:55:19 1.41 +++ rxvt-unicode/src/rxvtimg.h 2013/10/01 13:30:04 1.49 @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------* - * File: rxvtimg.C + * File: rxvtimg.h *----------------------------------------------------------------------* * * All portions of code are copyright by their respective author/s. @@ -24,10 +24,6 @@ #ifndef IMG_H #define IMG_H -#if HAVE_BG_PIXMAP - #define HAVE_IMG 1 -#endif - #if HAVE_IMG #define float_to_component(d) (int32_t)((d) * 65535.99) @@ -89,10 +85,12 @@ void unshare (); // prepare for write void fill (const rgba &c); + void fill (const rgba &c, int x, int y, int w, int h); 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); @@ -127,9 +125,12 @@ rxvt_img *scale (int new_width, int new_height); rxvt_img *rotate (int cx, int cy, nv phi); rxvt_img *convert_format (XRenderPictFormat *format, const rgba &bg); - rxvt_img *blend (rxvt_img *img, nv factor = 1.); + rxvt_img *tint (const rgba &c); + rxvt_img *shade (nv factor, rgba c = rgba (rgba::MAX_CC, rgba::MAX_CC, rgba::MAX_CC)); + rxvt_img *filter (const char *name, int nparams = 0, nv *params = 0); + rxvt_img *muladd (nv mul, nv add); // general multiply and add, implemented as the biggest hack ever :/ - // egregiuous helper category + // egregious helper category rxvt_img *replace (rxvt_img *&p) { delete p; @@ -137,9 +138,9 @@ return this; } -private: - + /* these are considered private */ void destroy (); + rxvt_img *new_empty (); Picture picture (); rxvt_img *transform (const nv *matrix); };