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.76 by root, Sun Jun 10 10:29:26 2012 UTC vs.
Revision 1.77 by root, Sun Jun 10 10:35:03 2012 UTC

50 50
51 return img; 51 return img;
52} 52}
53 53
54# if HAVE_PIXBUF 54# if HAVE_PIXBUF
55
55rxvt_img * 56rxvt_img *
56rxvt_img::new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb) 57rxvt_img::new_from_pixbuf (rxvt_screen *s, GdkPixbuf *pb)
57{ 58{
58 Display *dpy = s->display->dpy; 59 Display *dpy = s->display->dpy;
59 60
166 167
167 g_object_unref (pb); 168 g_object_unref (pb);
168 169
169 return img; 170 return img;
170} 171}
172
171# endif 173# endif
172 174
173void 175void
174rxvt_img::destroy () 176rxvt_img::destroy ()
175{ 177{
224} 226}
225 227
226void 228void
227rxvt_img::fill (const rxvt_color &c) 229rxvt_img::fill (const rxvt_color &c)
228{ 230{
229 XGCValues gcv; 231 rgba cc;
230 gcv.foreground = c; 232 c.get (cc);
231 GC gc = XCreateGC (s->display->dpy, pm, GCForeground, &gcv); 233 XRenderColor rc = { cc.r, cc.g, cc.b, cc.a };
232 XFillRectangle (s->display->dpy, pm, gc, 0, 0, w, h); 234
233 XFreeGC (s->display->dpy, gc); 235 Display *dpy = s->display->dpy;
236 Picture src = src_picture ();
237 XRenderFillRectangle (dpy, PictOpSrc, src, &rc, 0, 0, w, h);
238 XRenderFreePicture (dpy, src);
234} 239}
235 240
236static void 241static void
237get_gaussian_kernel (int radius, int width, double *kernel, XFixed *params) 242get_gaussian_kernel (int radius, int width, double *kernel, XFixed *params)
238{ 243{
308 w, h); 313 w, h);
309 } 314 }
310 315
311 free (kernel); 316 free (kernel);
312 free (params); 317 free (params);
318
313 XRenderFreePicture (dpy, src); 319 XRenderFreePicture (dpy, src);
314 XRenderFreePicture (dpy, dst); 320 XRenderFreePicture (dpy, dst);
315 XRenderFreePicture (dpy, tmp); 321 XRenderFreePicture (dpy, tmp);
316 322
317 return img; 323 return img;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines