|
NAMESDL::Rect - Defines a rectangular areaCATEGORYCore, Video, StructureSYNOPSISmy $rect = SDL::Rect->new(0, 0, 50, 4); $rect->x(1); $rect->y(2); $rect->w(3); my $x = $rect->x; # 1 my $y = $rect->y; # 2 my $w = $rect->w; # 3 my $h = $rect->h; # 4 DESCRIPTIONAn "SDL_Rect" defines a rectangular area of pixels.METHODSnewmy $rect = SDL::Rect->new( $x, $y, $w, $h ); The constructor creates a new rectangle with the specified x, y, width and height values. xmy $x = $rect->x; $rect->x(128); If passed a value, this method sets the x component of the rectangle; if not, it returns the x component of the rectangle. ymy $y = $rect->y; $rect->y(128); If passed a value, this method sets the y component of the rectangle; if not, it returns the y component of the rectangle. wmy $w = $rect->w; $rect->w(128); If passed a value, this method sets the w component of the rectangle; if not, it returns the w component of the rectangle. hmy $h = $rect->h; $rect->h(128); If passed a value, this method sets the h component of the rectangle; if not, it returns the h component of the rectangle. SEE ALSOSDL::SurfaceAUTHORSSee "AUTHORS" in SDL.
Visit the GSP FreeBSD Man Page Interface. |