166 |
$app->sync; |
$app->sync; |
167 |
} |
} |
168 |
|
|
169 |
|
=head2 render |
170 |
|
|
171 |
|
$self->render( @video_memory ); |
172 |
|
|
173 |
|
=cut |
174 |
|
|
175 |
|
sub render { |
176 |
|
my $self = shift; |
177 |
|
|
178 |
|
die "this function isn't supported if scale isn't 1" unless $self->scale == 1; |
179 |
|
|
180 |
|
$app->lock; |
181 |
|
|
182 |
|
my ( $x, $y ) = ( 0,0 ); |
183 |
|
|
184 |
|
foreach my $b ( @_ ) { |
185 |
|
foreach my $p ( split(//, unpack("B8",pack("C",$b)) ) ) { |
186 |
|
$app->pixel( $x, $y, $p ? $white : $black ); |
187 |
|
$x++; |
188 |
|
} |
189 |
|
if ( $x == 256 ) { |
190 |
|
$x = 0; |
191 |
|
$y++; |
192 |
|
} |
193 |
|
} |
194 |
|
|
195 |
|
$app->unlock; |
196 |
|
$app->sync; |
197 |
|
|
198 |
|
warn "Screen::render over\n"; |
199 |
|
} |
200 |
|
|
201 |
=head1 SEE ALSO |
=head1 SEE ALSO |
202 |
|
|
203 |
L<Orao> is sample implementation using this module |
L<Orao> is sample implementation using this module |