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.86 by root, Thu Jun 14 19:31:17 2012 UTC vs.
Revision 1.87 by root, Thu Jun 14 19:36:35 2012 UTC

630 630
631rxvt_img * 631rxvt_img *
632rxvt_img::transform (nv matrix[3][3]) 632rxvt_img::transform (nv matrix[3][3])
633{ 633{
634 // find new offset 634 // find new offset
635 int ox = mat_apply (matrix, 0, -x, -y); 635 int ox = mat_apply (matrix, 0, x, y);
636 int oy = mat_apply (matrix, 1, -x, -y); 636 int oy = mat_apply (matrix, 1, x, y);
637 637
638 // calculate new pixel bounding box coordinates 638 // calculate new pixel bounding box coordinates
639 nv d [2], rmin[2], rmax[2]; 639 nv d [2], rmin[2], rmax[2];
640 640
641 for (int i = 0; i < 2; ++i) 641 for (int i = 0; i < 2; ++i)
654 int new_height = ceil (rmax [1] - dy); 654 int new_height = ceil (rmax [1] - dy);
655 655
656 nv inv[3][3]; 656 nv inv[3][3];
657 mat_invert (matrix, inv); 657 mat_invert (matrix, inv);
658 658
659 rxvt_img *img = new rxvt_img (s, format, ox - dx - d [0], oy - dy - d [1], new_width, new_height, repeat); 659 rxvt_img *img = new rxvt_img (s, format, dx + d [0] - ox, dy + d [1] - oy, new_width, new_height, repeat);
660 img->alloc (); 660 img->alloc ();
661 661
662 Display *dpy = s->display->dpy; 662 Display *dpy = s->display->dpy;
663 Picture src = picture (); 663 Picture src = picture ();
664 Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0); 664 Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines