GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
pods::SDL::Rect(3) User Contributed Perl Documentation pods::SDL::Rect(3)

SDL::Rect - Defines a rectangular area

Core, Video, Structure

 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

An "SDL_Rect" defines a rectangular area of pixels.

 my $rect = SDL::Rect->new( $x, $y, $w, $h );

The constructor creates a new rectangle with the specified x, y, width and height values.

 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.

 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.

 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.

 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.

SDL::Surface

See "AUTHORS" in SDL.
2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.