Allegro::Display - Allegro Display object
use Allegro; $al = Allegro->new(); $display = $al->Display(width => 640, height => 480);
Allegro::Display provides an object used to access the full screen or window bitmap. It is anagalous to Allegro's screen pointer.
screen
This class contains methods to create and destroy a new window/screen, as well as methods to set the palette.
The Display class inherits from the Bitmap class. Therefore all Bitmap methods will work on a Display object.
Creates a new Allergo::Display object. This will set a graphics mode and return an object that can be used as a normal Allegro::Bitmap object (it is a sub-class of Bitmap).
$disp = $al->Display(width => 640, height => 480, v_width => 1024, v_height => 768, depth => 24, mode => 'window');
The virtual width and height requested will not necessarily be what you requested. Use the v_width and v_height methods to check. Similarly, if you don't specify width and height, use width and height to find out the width and height.
Width of desired screen or window.
Height of desired screen or window.
Desired virtual width of screen. Defaults to width.
Desired virtual height of screen. Defaults to height.
Depth (in bits) of screen. Defaults to whatever is convenient. Therefore you should always specify this if a certain bit depth is required.
Type of display to create. Valid options are auto, window, and fullscreen. Defaults to auto.
auto
window
fullscreen
Shuts down the display and either returns to text mode or destroys the visible window, depending on platform.
$disp->shutdown;
Sets the display window's title. This method has no effect if the display is in full screen mode or there are no window titles. Returns the current title.
$title = $disp->title; $disp->title("Allegro Perl program");
Sets the current palette to the one supplied as an argument. Returns the current palette. The supplied palette should be an Allegro::Palette object.
$old_pal = $disp->palette; $disp->palette($new_pal);
Retrieves virtual width of the screen.
Retrieves virtual height of the screen.
Colin O'Leary <colino@cpan.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.
To install Allegro, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Allegro
CPAN shell
perl -MCPAN -e shell install Allegro
For more information on module installation, please visit the detailed CPAN module installation guide.