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