SDL::Rect - a SDL perl extension
$rect = new SDL::Rect ( -height => 4, -width => 40 );
SDL::Rect::new creates a SDL_Rect structure which is used for specifying regions for filling, blitting, and updating. These objects make it easy to cut and backfill. By default, x, y, h, w are 0.
SDL::Rect::new
The four fields of a rectangle can be set simply by passing a value to the applicable method. These are:
SDL::Rect::x sets and fetches the x position.
SDL::Rect::x
SDL::Rect::y sets and fetches the y position.
SDL::Rect::y
SDL::Rect::width sets and fetched the width.
SDL::Rect::width
SDL::Rect::height sets and fetched the height.
SDL::Rect::height
David J. Goehrig
perl(1) SDL::Surface(3)
To install SDL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SDL
CPAN shell
perl -MCPAN -e shell install SDL
For more information on module installation, please visit the detailed CPAN module installation guide.