Made Windows not use Gamma Functions
[sdlgit/SDL_perl.git] / lib / SDL / Rect.pm
1 package SDL::Rect;
2 use strict;
3 use warnings;
4 require Exporter;
5 require DynaLoader;
6 our @ISA = qw(Exporter DynaLoader);
7 bootstrap SDL::Rect;
8
9 1;
10
11 __END__
12
13 =pod
14
15 =head1 NAME
16
17 SDL::Rect - Defines a rectangular area
18
19 =head1 SYNOPSIS
20
21   my $rect = SDL::Rect->new( 0, 0, 0, 0 );
22   $rect->x(1);
23   $rect->y(2);
24   $rect->w(3);
25   $rect->h(4);
26   my $x = $rect->x; # 1
27   my $y = $rect->y; # 2
28   my $w = $rect->w; # 3
29   my $h = $rect->h; # 4
30
31 =head1 DESCRIPTION
32
33 An C<SDL_Rect> defines a rectangular area of pixels.
34
35 =head1 METHODS
36
37 =head2 new ( $x, $y, $w, $h )
38
39 The constructor creates a new rectangle with the specified x, y, w, h
40 values:
41
42     my $rect = SDL::Rect->new( 0, 0, 0, 0 );
43
44 =head2 x
45
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:
48
49   my $x = $rect->x; # 255
50   $rect->x(128);
51
52 =head2 y
53
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:
56
57   my $y = $rect->y; # 255
58   $rect->y(128);
59
60 =head2 w
61
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:
64
65   my $w = $rect->w; # 255
66   $rect->w(128);
67
68 =head2 h
69
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:
72
73   my $h = $rect->h; # 255
74   $rect->h(128);
75
76 =head1 SEE ALSO
77
78 L<SDL::Surface>
79
80 =cut