… | |
… | |
359 | |
359 | |
360 | rxvt_img * |
360 | rxvt_img * |
361 | rxvt_img::scale (int new_width, int new_height) |
361 | rxvt_img::scale (int new_width, int new_height) |
362 | { |
362 | { |
363 | double matrix[9] = { |
363 | double matrix[9] = { |
364 | new_width / (double)w, 0, 0, |
364 | w / (double)new_width, 0, 0, |
365 | 0, new_height / (double)h, 0, |
365 | 0, h / (double)new_height, 0, |
366 | 0, 0, 1 |
366 | 0, 0, 1 |
367 | }; |
367 | }; |
368 | |
368 | |
369 | return transform (new_width, new_height, RepeatNormal, matrix); |
369 | return transform (new_width, new_height, RepeatNormal, matrix); |
370 | } |
370 | } |