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.78 by sf-exg, Mon Jun 11 12:08:30 2012 UTC vs.
Revision 1.79 by root, Tue Jun 12 10:45:53 2012 UTC

520 520
521 return img; 521 return img;
522} 522}
523 523
524rxvt_img * 524rxvt_img *
525rxvt_img::transform (int new_width, int new_height, double matrix[9]) 525rxvt_img::transform (double matrix[9], int new_width, int new_height)
526{ 526{
527 rxvt_img *img = new rxvt_img (s, format, 0, 0, new_width, new_height, repeat); 527 rxvt_img *img = new rxvt_img (s, format, 0, 0, new_width, new_height, repeat);
528 img->alloc (); 528 img->alloc ();
529 529
530 Display *dpy = s->display->dpy; 530 Display *dpy = s->display->dpy;
563 }; 563 };
564 564
565 int old_repeat_mode = repeat; 565 int old_repeat_mode = repeat;
566 repeat = RepeatPad; // not right, but xrender can't properly scale it seems 566 repeat = RepeatPad; // not right, but xrender can't properly scale it seems
567 567
568 rxvt_img *img = transform (new_width, new_height, matrix); 568 rxvt_img *img = transform (matrix, new_width, new_height);
569 569
570 repeat = old_repeat_mode; 570 repeat = old_repeat_mode;
571 img->repeat = repeat; 571 img->repeat = repeat;
572 572
573 return img; 573 return img;
574} 574}
575 575
576rxvt_img * 576rxvt_img *
577rxvt_img::rotate (int new_width, int new_height, int x, int y, double phi) 577rxvt_img::rotate (int x, int y, double phi, int new_width, int new_height)
578{ 578{
579 double s = sin (phi); 579 double s = sin (phi);
580 double c = cos (phi); 580 double c = cos (phi);
581 581
582 double matrix[9] = { 582 double matrix[9] = {
583 c, -s, -c * x + s * y + x, 583 c, -s, -c * x + s * y + x,
584 s, c, -s * x - c * y + y, 584 s, c, -s * x - c * y + y,
585 0, 0, 1 585 0, 0, 1
586 }; 586 };
587 587
588 return transform (new_width, new_height, matrix); 588 return transform (matrix, new_width, new_height);
589} 589}
590 590
591rxvt_img * 591rxvt_img *
592rxvt_img::convert_format (XRenderPictFormat *new_format, const rxvt_color &bg) 592rxvt_img::convert_format (XRenderPictFormat *new_format, const rxvt_color &bg)
593{ 593{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines