Simplyify SDL::Rect to be just an XS wrapper, add a few methods to SDL::Game::Rect
[sdlgit/SDL_perl.git] / lib / SDL / Game / Rect.pm
index 92e0948..3166b8f 100644 (file)
@@ -25,6 +25,27 @@ sub new {
 #############################
 ## extra accessors
 #############################
+
+sub left {
+    my $self = shift;
+    $self->x(@_);
+}
+
+sub top {
+    my $self = shift;
+    $self->y(@_);
+}
+
+sub width {
+    my $self = shift;
+    $self->w(@_);
+}
+
+sub height {
+    my $self = shift;
+    $self->h(@_);
+}
+
 sub bottom {
     my ($self, $val) = (@_);
     if (defined $val) {