Fixed the pod path in archive
[sdlgit/SDL_perl.git] / lib / pods / SDL / Rect.pod
CommitLineData
896b04ee 1=pod
2
3=head1 NAME
4
5SDL::Rect - Defines a rectangular area
6
7=head1 SYNOPSIS
8
9 my $rect = SDL::Rect->new( 0, 0, 0, 0 );
10 $rect->x(1);
11 $rect->y(2);
12 $rect->w(3);
13 $rect->h(4);
14 my $x = $rect->x; # 1
15 my $y = $rect->y; # 2
16 my $w = $rect->w; # 3
17 my $h = $rect->h; # 4
18
19=head1 DESCRIPTION
20
21An C<SDL_Rect> defines a rectangular area of pixels.
22
23=head1 METHODS
24
25=head2 new ( $x, $y, $w, $h )
26
27The constructor creates a new rectangle with the specified x, y, w, h
28values:
29
30 my $rect = SDL::Rect->new( 0, 0, 0, 0 );
31
32=head2 x
33
34If passed a value, this method sets the x component of the rectangle;
35if not, it returns the x component of the rectangle:
36
37 my $x = $rect->x; # 255
38 $rect->x(128);
39
40=head2 y
41
42If passed a value, this method sets the y component of the rectangle;
43if not, it returns the y component of the rectangle:
44
45 my $y = $rect->y; # 255
46 $rect->y(128);
47
48=head2 w
49
50If passed a value, this method sets the w component of the rectangle;
51if not, it returns the w component of the rectangle:
52
53 my $w = $rect->w; # 255
54 $rect->w(128);
55
56=head2 h
57
58If passed a value, this method sets the h component of the rectangle;
59if not, it returns the h component of the rectangle:
60
61 my $h = $rect->h; # 255
62 $rect->h(128);
63
64=head1 SEE ALSO
65
66L<SDL::Surface>
67
68=cut