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 = 0, and h, w default to 0. (the default scratch sizes);
The four fields of a rectangle can be set simply by passing a value to the applicable method. These are: $rect->x(4); # sets x to 4 $rect->y(); # reads y $rect->width(49); # sets width to 49 $rect->height(); # reads height
David J. Goehrig
perl(1) SDL::Surface(3)
To install SDL::sdlpl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SDL::sdlpl
CPAN shell
perl -MCPAN -e shell install SDL::sdlpl
For more information on module installation, please visit the detailed CPAN module installation guide.