$destRow = $current->{'rowTop'} + $row - 2;
if ($destRow>$screen->{'height'})
{
$destRow = $screen->{'height'};
}
####
$backAtt[$destRow][$destCol] =
$current->{'backAtt'}[$row - 1][$col - 1];
$self->{'zBuffer'}[$destRow][$destCol] = $active;
substr($backTxt[$destRow], $destCol, 1) =
substr($current->{'backTxt'}[$row - 1],$col - 1, 1);
####
sub makeFullBackBuffer {
my ($self) = @_;
my (@backAtt, @backTxt, $screen, $current, $destCol, $destRow, $active);
$screen = $self->{miniwin}[ 0 ];
for( 1 .. $screen->{height} ) {
push @backTxt, ' ' x $screen->{width};
push @backAtt, [ (0) x $screen->{width} ];
}
for $active (reverse @{ $self->{winStack} } ) {
$current = $self->{miniwin}[ $active ];
for my $row ( 1 .. $current->{height} ) {
$destRow = $current->{rowTop} + $row - 2;
$destRow = $screen->{height} if $destRow>$screen->{height};
my $colMin = $current->{colTop} - 1;
my $colMax = min(
$screen->{width},
$current->{colTop} + $screen->{width} - 2
);
my $cols = $colMax - $colMin +1;
@{ $backAtt[ $destRow ] }[ $colMin .. $colMax ]
= @{ $current->{backAtt}[ $row - 1 ] }[ 0 .. cols ];
@{ $self->{zBuffer}[$destRow] }[ $colMin .. $colMax ]
= ( $active ) x $cols;
substr( $backTxt[ $destRow ], $colMin, $cols )
= substr( $current->{backTxt}[ $row - 1 ], 0, $cols );
}
}
return \( @backAtt, @backTxt );
}