X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=sdlgit%2FSDL-Site.git;a=blobdiff_plain;f=pages%2FSDL-Rect.html-inc;h=d425df011cb5531342e162a8ab8a63c13fb80afd;hp=cdcd1ed3f7037063b1662c00946feee83cfbc543;hb=801213bdc2b379a428fdebad07e9d404cec99a06;hpb=411e0b6a19b323b88847fbffe2323afe98e9f8dc diff --git a/pages/SDL-Rect.html-inc b/pages/SDL-Rect.html-inc index cdcd1ed..d425df0 100644 --- a/pages/SDL-Rect.html-inc +++ b/pages/SDL-Rect.html-inc @@ -9,7 +9,7 @@
my $rect = SDL::Rect->new( 0, 0, 0, 0 ); - $rect->x(1); - $rect->y(2); - $rect->w(3); - $rect->h(4); - my $x = $rect->x; # 1 - my $y = $rect->y; # 2 - my $w = $rect->w; # 3 - my $h = $rect->h; # 4 +my $rect = SDL::Rect->new(0, 0, 50, 4); + $rect->x(1); + $rect->y(2); + $rect->w(3); + my $x = $rect->x; # 1 + my $y = $rect->y; # 2 + my $w = $rect->w; # 3 + my $h = $rect->h; # 4@@ -55,53 +54,52 @@-new ( $x, $y, $w, $h )
--The constructor creates a new rectangle with the specified x, y, w, h -values:
-my $rect = SDL::Rect->new( 0, 0, 0, 0 ); +new
++my $rect = SDL::Rect->new( $x, $y, $w, $h );+The constructor creates a new rectangle with the specified x, y, width and height values.
x
-If passed a value, this method sets the x component of the rectangle; -if not, it returns the x component of the rectangle:
-my $x = $rect->x; # 255 - $rect->x(128); +my $x = $rect->x; + $rect->x(128);+If passed a value, this method sets the x component of the rectangle; +if not, it returns the x component of the rectangle.
y
-If passed a value, this method sets the y component of the rectangle; -if not, it returns the y component of the rectangle:
-my $y = $rect->y; # 255 - $rect->y(128); +my $y = $rect->y; + $rect->y(128);+If passed a value, this method sets the y component of the rectangle; +if not, it returns the y component of the rectangle.
w
-If passed a value, this method sets the w component of the rectangle; -if not, it returns the w component of the rectangle:
-my $w = $rect->w; # 255 - $rect->w(128); +my $w = $rect->w; + $rect->w(128);+If passed a value, this method sets the w component of the rectangle; +if not, it returns the w component of the rectangle.
h
-If passed a value, this method sets the h component of the rectangle; -if not, it returns the h component of the rectangle:
-my $h = $rect->h; # 255 - $rect->h(128); +my $h = $rect->h; + $rect->h(128);+If passed a value, this method sets the h component of the rectangle; +if not, it returns the h component of the rectangle.
SEE ALSO