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

Comparing rxvt-unicode/src/rxvtimg.C (file contents):
Revision 1.4 by root, Sun Jun 3 18:14:13 2012 UTC vs.
Revision 1.5 by root, Sun Jun 3 18:33:46 2012 UTC

21 GdkPixbuf *pb = gdk_pixbuf_new_from_file (filename, &err); 21 GdkPixbuf *pb = gdk_pixbuf_new_from_file (filename, &err);
22 22
23 if (!pb) 23 if (!pb)
24 return 0; 24 return 0;
25 25
26 int w = gdk_pixbuf_get_width (pb);
27 int h = gdk_pixbuf_get_height (pb);
28
29 rxvt_img *img = new rxvt_img ( 26 rxvt_img *img = new rxvt_img (
30 s, 27 s,
31 XRenderFindStandardFormat (s->display->dpy, gdk_pixbuf_get_has_alpha (pb) ? PictStandardARGB32 : PictStandardRGB24), 28 XRenderFindStandardFormat (s->display->dpy, gdk_pixbuf_get_has_alpha (pb) ? PictStandardARGB32 : PictStandardRGB24),
32 gdk_pixbuf_get_width (pb), 29 gdk_pixbuf_get_width (pb),
33 gdk_pixbuf_get_height (pb) 30 gdk_pixbuf_get_height (pb)
34 ); 31 );
35 32
36 img->render (pb, 0, 0, w, h, 0, 0); 33 img->render (pb, 0, 0, img->w, img->h, 0, 0);
37 34
38 return img; 35 return img;
39} 36}
40 37
41rxvt_img::~rxvt_img () 38rxvt_img::~rxvt_img ()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines