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.104 by root, Sat Jul 14 08:27:55 2012 UTC vs.
Revision 1.105 by sf-exg, Sat Jan 19 10:04:34 2013 UTC

915 915
916 return cc; 916 return cc;
917} 917}
918 918
919rxvt_img * 919rxvt_img *
920rxvt_img::shade (nv factor, rgba c)
921{
922 clamp_it (factor, -1., 1.);
923 factor++;
924
925 if (factor > 1)
926 {
927 c.r = c.r * (2 - factor);
928 c.g = c.g * (2 - factor);
929 c.b = c.b * (2 - factor);
930 }
931 else
932 {
933 c.r = c.r * factor;
934 c.g = c.g * factor;
935 c.b = c.b * factor;
936 }
937
938 rxvt_img *img = this->tint (c);
939
940 if (factor > 1)
941 {
942 c.a = 0xffff;
943 c.r =
944 c.g =
945 c.b = 0xffff * (factor - 1);
946
947 img->brightness (c.r, c.g, c.b, c.a);
948 }
949
950 return img;
951}
952
953rxvt_img *
920rxvt_img::filter (const char *name, int nparams, nv *params) 954rxvt_img::filter (const char *name, int nparams, nv *params)
921{ 955{
922 composer cc (this); 956 composer cc (this);
923 957
924 XFixed *xparams = rxvt_temp_buf<XFixed> (nparams); 958 XFixed *xparams = rxvt_temp_buf<XFixed> (nparams);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines