6 our @ISA = qw(Exporter DynaLoader);
17 SDL::Rect - Defines a rectangular area
21 my $rect = SDL::Rect->new( 0, 0, 0, 0 );
33 An C<SDL_Rect> defines a rectangular area of pixels.
37 =head2 new ( $x, $y, $w, $h )
39 The constructor creates a new rectangle with the specified x, y, w, h
42 my $rect = SDL::Rect->new( 0, 0, 0, 0 );
46 If passed a value, this method sets the x component of the rectangle;
47 if not, it returns the x component of the rectangle:
49 my $x = $rect->x; # 255
54 If passed a value, this method sets the y component of the rectangle;
55 if not, it returns the y component of the rectangle:
57 my $y = $rect->y; # 255
62 If passed a value, this method sets the w component of the rectangle;
63 if not, it returns the w component of the rectangle:
65 my $w = $rect->w; # 255
70 If passed a value, this method sets the h component of the rectangle;
71 if not, it returns the h component of the rectangle:
73 my $h = $rect->h; # 255