repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 8ea0a7e65c277f5670421b5b734411324fb1b9c6: path_to: revision_to:
commit 8ea0a7e65c277f5670421b5b734411324fb1b9c6 Author: Marc LehmannDate: Fri Jun 15 19:50:56 2012 +0000 *** empty log message *** diff --git a/src/perl/background b/src/perl/background
--- a/src/perl/background
+++ b/src/perl/background
@@ -308,9 +308,14 @@ multiple copies of the same image to apply different effects to.
Takes any number of images and merges them together, creating a single
image containing them all.
+This function is called automatically when an expression returns multiple
+images.
+
=cut
sub merge(@) {
+ return $_[0] unless $#_;
+
# rather annoyingly clumsy, but optimisation is for another time
my $x0 = +1e9;
@@ -907,8 +912,8 @@ sub recalculate {
# evaluate user expression
- my $img = eval { $self->{expr}->() };
- warn $@ if $@;#d#
+ my $img = eval { urxvt::bgdsl::merge $self->{expr}->() };
+ die $@ if $@;
die "background-expr did not return an image.\n" if !UNIVERSAL::isa $img, "urxvt::img";
# if the expression is sensitive to external events, prepare reevaluation then
diff --git a/src/rxvtimg.h b/src/rxvtimg.h
--- a/src/rxvtimg.h +++ b/src/rxvtimg.h @@ -90,6 +90,10 @@ struct rxvt_img } void draw (rxvt_img *img, int op = PictOpOver, nv mask = 1.); +#if 0 + void draw (rxvt_img *img, int op = PictOpOver, nv mask = 1., + nv px, nv py, nv qx, nv qy, nv rx, nv ry, nv sx, nv sy); +#endif // copy rxvt_img *reify (); // make x, y 0, make real width/height
-----END OF PAGE-----