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.98 by root, Sun Jun 17 21:58:18 2012 UTC vs.
Revision 1.100 by root, Mon Jul 2 02:01:41 2012 UTC

476 pm = pm2; 476 pm = pm2;
477 ref = new pixref (ref->w, ref->h); 477 ref = new pixref (ref->w, ref->h);
478} 478}
479 479
480void 480void
481rxvt_img::fill (const rgba &c) 481rxvt_img::fill (const rgba &c, int x, int y, int w, int h)
482{ 482{
483 XRenderColor rc = { c.r, c.g, c.b, c.a }; 483 XRenderColor rc = { c.r, c.g, c.b, c.a };
484 484
485 Display *dpy = s->dpy; 485 Display *dpy = s->dpy;
486 Picture src = picture (); 486 Picture src = picture ();
487 XRenderFillRectangle (dpy, PictOpSrc, src, &rc, 0, 0, w, h); 487 XRenderFillRectangle (dpy, PictOpSrc, src, &rc, x, y, w, h);
488 XRenderFreePicture (dpy, src); 488 XRenderFreePicture (dpy, src);
489}
490
491void
492rxvt_img::fill (const rgba &c)
493{
494 fill (c, 0, 0, w, h);
489} 495}
490 496
491void 497void
492rxvt_img::add_alpha () 498rxvt_img::add_alpha ()
493{ 499{
815} 821}
816 822
817rxvt_img * 823rxvt_img *
818rxvt_img::rotate (int cx, int cy, nv phi) 824rxvt_img::rotate (int cx, int cy, nv phi)
819{ 825{
820#if 0
821 { c, -s, cx - c * cx + s * cy },
822 { s, c, cy - s * cx - c * cy },
823 { 0, 0, 1 }
824#endif
825
826 move (-cx, -cy); 826 move (-cx, -cy);
827 rxvt_img *img = transform (mat3x3::rotate (phi)); 827 rxvt_img *img = transform (mat3x3::rotate (phi));
828 move ( cx, cy); 828 move ( cx, cy);
829 img->move (cx, cy); 829 img->move (cx, cy);
830 830
868} 868}
869 869
870rxvt_img * 870rxvt_img *
871rxvt_img::filter (const char *name, int nparams, nv *params) 871rxvt_img::filter (const char *name, int nparams, nv *params)
872{ 872{
873 rxvt_img *img = new_empty ();
874
875 composer cc (img); 873 composer cc (this);
876 874
877 XFixed *xparams = rxvt_temp_buf<XFixed> (nparams); 875 XFixed *xparams = rxvt_temp_buf<XFixed> (nparams);
878 876
879 for (int i = 0; i < nparams; ++i) 877 for (int i = 0; i < nparams; ++i)
880 xparams [i] = XDoubleToFixed (params [i]); 878 xparams [i] = XDoubleToFixed (params [i]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines