ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/background
(Generate patch)

Comparing rxvt-unicode/src/perl/background (file contents):
Revision 1.57 by root, Thu Jun 14 18:06:15 2012 UTC vs.
Revision 1.58 by root, Thu Jun 14 18:13:19 2012 UTC

309image containing them all. 309image containing them all.
310 310
311=cut 311=cut
312 312
313 sub merge(@) { 313 sub merge(@) {
314 #TODO 314 # rather annoyingly clumsy, but optimisation is for another time
315
316 my $x0 = 1e9;
317 my $y0 = 1e9;
318 my $x1 = -1e9;
319 my $y1 = -1e9;
320
321 for (@_) {
322 my ($x, $y, $w, $h) = $_->geometry;
323
324 $x0 = $x if $x0 > $x;
325 $y0 = $y if $y0 > $y;
326
327 $x += $w;
328 $y += $h;
329
330 $x1 = $x if $x1 > $x;
331 $y1 = $y if $y1 > $y;
332 }
333
334 my $base = $self->new_img ($x0, $y0, $x1 - $x0, $y1 - $y0);
335 $base->fill ([0, 0, 0, 0]);
336
337 $base->blend (1., $_)
338 for @_;
339
340 $base
315 } 341 }
316 342
317=head2 TILING MODES 343=head2 TILING MODES
318 344
319The following operators modify the tiling mode of an image, that is, the 345The following operators modify the tiling mode of an image, that is, the

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines