-
-
19 May 2018 10:58:08 UTC
- Distribution: SDL
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (97)
- Testers (295 / 131 / 0)
- Kwalitee
Bus factor: 3- 65.12% Coverage
- License: lgpl_2_1
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (2.37MB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- CPAN
- File::ShareDir
- Scalar::Util
- Tie::Simple
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
SDL::Rect - Defines a rectangular area
CATEGORY
Core, Video, Structure
SYNOPSIS
my $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
DESCRIPTION
An
SDL_Rect
defines a rectangular area of pixels.METHODS
new
my $rect = SDL::Rect->new( $x, $y, $w, $h );
The constructor creates a new rectangle with the specified x, y, width and height values.
x
my $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.
y
my $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.
w
my $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.
h
my $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 ALSO
AUTHORS
See "AUTHORS" in SDL.
Module Install Instructions
To install SDL, copy and paste the appropriate command in to your terminal.
cpanm SDL
perl -MCPAN -e shell install SDL
For more information on module installation, please visit the detailed CPAN module installation guide.