Allegro::Palette - Allegro Palette object
use Allegro;
$al = Allegro->new() or die;
$d = $al->Display(width => 640, height => 480)
or die $al->error;
$bmp = $d->Bitmap(file => 'test.pcx') or die;
$d->palette($bmp->palette); $d->blit($bmp); sleep;
The Palette object holds a set of color entries for 8-bit color modes. Palettes can be loaded from datafiles or bitmap files.
To access a Palette object from a Bitmap object, use Bitmap's palette method. Palettes can also be loaded like any other datafile object. To set a palette see the palette method of Allegro::Display.
$pal = $al->Palette();
$pal->set($index, $red, $green, $blue);
($r, $g, $b) = $pal->get($index);
Colin O'Leary <colin@mx3.org>
Copyright 2003 by Colin O'Leary. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The Allegro library is copyright its authors, and is giftware. See http://alleg.sf.net for more information.