… | … | ||
---|---|---|---|
477 | } | 477 | } |
478 | 478 | ||
479 | rxvt_img * | 479 | rxvt_img * |
480 | rxvt_img::scale (int new_width, int new_height) | 480 | rxvt_img::scale (int new_width, int new_height) |
481 | { | 481 | { |
482 | if (w == new_width && h == new_height) | ||
483 | return clone (); | ||
484 | |||
482 | double matrix[9] = { | 485 | double matrix[9] = { |
483 | w / (double)new_width, 0, 0, | 486 | w / (double)new_width, 0, 0, |
484 | 0, h / (double)new_height, 0, | 487 | 0, h / (double)new_height, 0, |
485 | 0, 0, 1 | 488 | 0, 0, 1 |
486 | }; | 489 | }; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |