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.7 by sf-exg, Sun Jun 3 20:34:25 2012 UTC vs.
Revision 1.10 by sf-exg, Mon Jun 4 06:59:50 2012 UTC

216} 216}
217 217
218rxvt_img * 218rxvt_img *
219rxvt_img::convert_to (XRenderPictFormat *new_format) 219rxvt_img::convert_to (XRenderPictFormat *new_format)
220{ 220{
221 rxvt_img *img = new rxvt_img (s, new_format, w, h);
222
221 Display *dpy = s->display->dpy; 223 Display *dpy = s->display->dpy;
222 Pixmap new_pm = XCreatePixmap (dpy, pm, w, h, new_format->depth);
223 Picture src = XRenderCreatePicture (dpy, pm, format, 0, 0); 224 Picture src = XRenderCreatePicture (dpy, pm, format, 0, 0);
224 Picture dst = XRenderCreatePicture (dpy, new_pm, new_format, 0, 0); 225 Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0);
225 226
226 XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, w, h); 227 XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, w, h);
227 228
228 XRenderFreePicture (dpy, src); 229 XRenderFreePicture (dpy, src);
229 XRenderFreePicture (dpy, dst); 230 XRenderFreePicture (dpy, dst);
230 231
231 rxvt_img *img = new rxvt_img (
232 s,
233 new_format,
234 w,
235 h,
236 new_pm
237 );
238
239 return img; 232 return img;
240} 233}
241 234
242#endif 235#endif
243 236

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines