--- rxvt-unicode/src/rxvtimg.h 2012/06/14 18:19:11 1.36 +++ rxvt-unicode/src/rxvtimg.h 2012/06/15 18:36:26 1.39 @@ -1,4 +1,4 @@ -#ifndef IMG_H +#ifndef IMG_H), #define IMG_H #if HAVE_BG_PIXMAP @@ -11,12 +11,8 @@ #include -class rxvt_img +struct rxvt_img { - void destroy (); - Picture src_picture (); - -public: typedef double nv; // *could* also hold the Pixmap itself @@ -59,8 +55,8 @@ // inplace void move (int dx, int dy) { - x -= dx; - y -= dy; + x += dx; + y += dy; } void repeat_mode (int repeat) @@ -93,12 +89,14 @@ float_to_component (a)); } + void draw (rxvt_img *img, int op = PictOpOver, nv mask = 1.); + // copy rxvt_img *reify (); // make x, y 0, make real width/height 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 (nv matrix[3][3]); + rxvt_img *transform (const nv matrix[3][3]); 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); @@ -111,6 +109,12 @@ p = this; return this; } + +private: + + void destroy (); + Picture picture (); + rxvt_img *transform (const nv *matrix); }; #endif