… | |
… | |
308 | |
308 | |
309 | Loads the image at the given C<$path>. The image is set to plane tiling |
309 | Loads the image at the given C<$path>. The image is set to plane tiling |
310 | mode. |
310 | mode. |
311 | |
311 | |
312 | If the image is already in memory (e.g. because another terminal instance |
312 | If the image is already in memory (e.g. because another terminal instance |
313 | uses it), then the in-memory copy us returned instead. |
313 | uses it), then the in-memory copy is returned instead. |
314 | |
314 | |
315 | =item load_uc $path |
315 | =item load_uc $path |
316 | |
316 | |
317 | Load uncached - same as load, but does not cache the image, which means it |
317 | Load uncached - same as load, but does not cache the image, which means it |
318 | is I<always> loaded from the filesystem again, even if another copy of it |
318 | is I<always> loaded from the filesystem again, even if another copy of it |
… | |
… | |
641 | =item scale $width_factor, $height_factor, $img |
641 | =item scale $width_factor, $height_factor, $img |
642 | |
642 | |
643 | Scales the image by the given factors in horizontal |
643 | Scales the image by the given factors in horizontal |
644 | (C<$width>) and vertical (C<$height>) direction. |
644 | (C<$width>) and vertical (C<$height>) direction. |
645 | |
645 | |
646 | If only one factor is give, it is used for both directions. |
646 | If only one factor is given, it is used for both directions. |
647 | |
647 | |
648 | If no factors are given, scales the image to the window size without |
648 | If no factors are given, scales the image to the window size without |
649 | keeping aspect. |
649 | keeping aspect. |
650 | |
650 | |
651 | =item resize $width, $height, $img |
651 | =item resize $width, $height, $img |
… | |
… | |
776 | =item rotate $center_x, $center_y, $degrees, $img |
776 | =item rotate $center_x, $center_y, $degrees, $img |
777 | |
777 | |
778 | Rotates the image clockwise by C<$degrees> degrees, around the point at |
778 | Rotates the image clockwise by C<$degrees> degrees, around the point at |
779 | C<$center_x> and C<$center_y> (specified as factor of image width/height). |
779 | C<$center_x> and C<$center_y> (specified as factor of image width/height). |
780 | |
780 | |
781 | Example: rotate the image by 90 degrees around it's center. |
781 | Example: rotate the image by 90 degrees around its center. |
782 | |
782 | |
783 | rotate 0.5, 0.5, 90, keep { load "$HOME/mybg.png" } |
783 | rotate 0.5, 0.5, 90, keep { load "$HOME/mybg.png" } |
784 | |
784 | |
785 | =cut |
785 | =cut |
786 | |
786 | |
… | |
… | |
815 | |
815 | |
816 | =cut |
816 | =cut |
817 | |
817 | |
818 | sub tint($$) { |
818 | sub tint($$) { |
819 | $_[1]->tint ($_[0]) |
819 | $_[1]->tint ($_[0]) |
|
|
820 | } |
|
|
821 | |
|
|
822 | =item shade $factor, $img |
|
|
823 | |
|
|
824 | Shade the image by the given factor. |
|
|
825 | |
|
|
826 | =cut |
|
|
827 | |
|
|
828 | sub shade($$) { |
|
|
829 | $_[1]->shade ($_[0]) |
820 | } |
830 | } |
821 | |
831 | |
822 | =item contrast $factor, $img |
832 | =item contrast $factor, $img |
823 | |
833 | |
824 | =item contrast $r, $g, $b, $img |
834 | =item contrast $r, $g, $b, $img |