Anonymous user
Colour bars/Display: Difference between revisions
→{{header|Perl}}
No edit summary |
|||
Line 128:
use GD ;
my %colors = (
my $barwidth = 160 / 8 ;
my $image = new GD::Image( 160 , 100 ) ;
my $start = 0 ;
foreach my $
my $paintcolor = $image->colorAllocate( @
$image->filledRectangle( $start * $barwidth , 0 , $start * $barwidth +
$barwidth - 1 , 99 , $paintcolor ) ;
|