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.48 by root, Sun Jun 10 15:01:14 2012 UTC vs.
Revision 1.49 by root, Sun Jun 10 15:29:18 2012 UTC

204 204
205=back 205=back
206 206
207=cut 207=cut
208 208
209our %_IMGCACHE;
209our $HOME; 210our $HOME;
210our ($self, $old, $new); 211our ($self, $old, $new);
211our ($x, $y, $w, $h); 212our ($x, $y, $w, $h);
212 213
213# enforce at least this interval between updates 214# enforce at least this interval between updates
683 684
684 sub contrast($$;$$;$) { 685 sub contrast($$;$$;$) {
685 my $img = pop; 686 my $img = pop;
686 my ($r, $g, $b, $a) = @_; 687 my ($r, $g, $b, $a) = @_;
687 688
688 ($g, $b) = ($r, $r) if @_ < 4; 689 ($g, $b) = ($r, $r) if @_ < 3;
689 $a = 1 if @_ < 5; 690 $a = 1 if @_ < 4;
690 691
691 $img = $img->clone; 692 $img = $img->clone;
692 $img->contrast ($r, $g, $b, $a); 693 $img->contrast ($r, $g, $b, $a);
693 $img 694 $img
694 } 695 }
695 696
696 sub brightness($$;$$;$) { 697 sub brightness($$;$$;$) {
697 my $img = pop; 698 my $img = pop;
698 my ($r, $g, $b, $a) = @_; 699 my ($r, $g, $b, $a) = @_;
699 700
700 ($g, $b) = ($r, $r) if @_ < 4; 701 ($g, $b) = ($r, $r) if @_ < 3;
701 $a = 1 if @_ < 5; 702 $a = 1 if @_ < 4;
702 703
703 $img = $img->clone; 704 $img = $img->clone;
704 $img->brightness ($r, $g, $b, $a); 705 $img->brightness ($r, $g, $b, $a);
705 $img 706 $img
706 } 707 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines