… | |
… | |
815 | } |
815 | } |
816 | |
816 | |
817 | rxvt_img * |
817 | rxvt_img * |
818 | rxvt_img::rotate (int cx, int cy, nv phi) |
818 | rxvt_img::rotate (int cx, int cy, nv phi) |
819 | { |
819 | { |
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); |
820 | move (-cx, -cy); |
827 | rxvt_img *img = transform (mat3x3::rotate (phi)); |
821 | rxvt_img *img = transform (mat3x3::rotate (phi)); |
828 | move ( cx, cy); |
822 | move ( cx, cy); |
829 | img->move (cx, cy); |
823 | img->move (cx, cy); |
830 | |
824 | |
… | |
… | |
868 | } |
862 | } |
869 | |
863 | |
870 | rxvt_img * |
864 | rxvt_img * |
871 | rxvt_img::filter (const char *name, int nparams, nv *params) |
865 | rxvt_img::filter (const char *name, int nparams, nv *params) |
872 | { |
866 | { |
873 | rxvt_img *img = new_empty (); |
|
|
874 | |
|
|
875 | composer cc (img); |
867 | composer cc (this); |
876 | |
868 | |
877 | XFixed *xparams = rxvt_temp_buf<XFixed> (nparams); |
869 | XFixed *xparams = rxvt_temp_buf<XFixed> (nparams); |
878 | |
870 | |
879 | for (int i = 0; i < nparams; ++i) |
871 | for (int i = 0; i < nparams; ++i) |
880 | xparams [i] = XDoubleToFixed (params [i]); |
872 | xparams [i] = XDoubleToFixed (params [i]); |