Using new Rect with v2.2.2.11. Had to change getClipRect paramters.
[sdlgit/SDL_perl.git] / lib / SDL / Rect.pm
1 package SDL::Rect;
2 #use strict;
3
4
5 require Exporter;
6 require DynaLoader;
7
8 @ISA = qw(Exporter DynaLoader);
9 # Items to export into callers namespace by default. Note: do not export
10 # names by default without a very good reason. Use EXPORT_OK instead.
11 # Do not simply export all your public functions/methods/constants.
12 @EXPORT = qw(
13         
14 );
15 #$VERSION = '0.01';
16
17 bootstrap SDL::Rect;
18
19 # Preloaded methods go here.
20
21 # TODO: mangle with the symbol table to create an alias
22 # to sub x. We could call x from inside the sub but that
23 # would be another call and rects are a time-critical object.
24 sub left {
25         my $self = shift;
26         RectX($self,@_);
27 }
28
29 sub x {
30         my $self = shift;
31         RectX($self,@_);
32 }
33
34 ### TODO: see 'left' above (this is an 'alias' to sub y)
35 sub top {
36         my $self = shift;
37         RectY($self,@_);
38 }
39
40 sub y {
41         my $self = shift;
42         RectY($self,@_);
43 }
44
45 ### TODO: see 'left' above (this is an 'alias' to sub width)
46 sub w {
47         my $self = shift;
48         RectW($self,@_);
49 }
50
51 sub width {
52         my $self = shift;
53         RectW($self,@_);
54 }
55
56 ### TODO: see 'left' above (this is an 'alias' to sub height)
57 sub h {
58         my $self = shift;
59         RectH($self,@_);
60 }
61
62 sub height {
63         my $self = shift;
64         RectH($self,@_);
65 }
66
67
68 # Autoload methods go after __END__, and are processed by the autosplit program.
69
70 1;
71 __END__