Commit | Line | Data |
162a0989 |
1 | <div class="pod"> |
2 | <!-- INDEX START --> |
3 | <h3 id="TOP">Index</h3> |
4 | |
5 | <ul><li><a href="#NAME">NAME</a></li> |
6 | <li><a href="#SYNOPSIS">SYNOPSIS</a></li> |
7 | <li><a href="#DESCRIPTION">DESCRIPTION</a></li> |
8 | <li><a href="#METHODS">METHODS</a> |
9 | <ul><li><a href="#new_x_y_w_h">new ( $x, $y, $w, $h )</a></li> |
10 | <li><a href="#x">x</a></li> |
11 | <li><a href="#y">y</a></li> |
12 | <li><a href="#w">w</a></li> |
13 | <li><a href="#h">h</a></li> |
14 | </ul> |
15 | </li> |
16 | <li><a href="#SEE_ALSO">SEE ALSO</a> |
17 | </li> |
18 | </ul><hr /> |
19 | <!-- INDEX END --> |
20 | |
21 | <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p> |
22 | <div id="NAME_CONTENT"> |
23 | <p>SDL::Rect - Defines a rectangular area</p> |
24 | |
25 | </div> |
26 | <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
27 | <div id="SYNOPSIS_CONTENT"> |
28 | <pre> my $rect = SDL::Rect->new( 0, 0, 0, 0 ); |
29 | $rect->x(1); |
30 | $rect->y(2); |
31 | $rect->w(3); |
32 | $rect->h(4); |
33 | my $x = $rect->x; # 1 |
34 | my $y = $rect->y; # 2 |
35 | my $w = $rect->w; # 3 |
36 | my $h = $rect->h; # 4 |
37 | |
38 | </pre> |
39 | |
40 | </div> |
41 | <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p> |
42 | <div id="DESCRIPTION_CONTENT"> |
43 | <p>An <code>SDL_Rect</code> defines a rectangular area of pixels.</p> |
44 | |
45 | </div> |
46 | <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
47 | <div id="METHODS_CONTENT"> |
48 | |
49 | </div> |
50 | <h2 id="new_x_y_w_h">new ( $x, $y, $w, $h )</h2> |
51 | <div id="new_x_y_w_h_CONTENT"> |
52 | <p>The constructor creates a new rectangle with the specified x, y, w, h |
53 | values:</p> |
54 | <pre> my $rect = SDL::Rect->new( 0, 0, 0, 0 ); |
55 | |
56 | </pre> |
57 | |
58 | </div> |
59 | <h2 id="x">x</h2> |
60 | <div id="x_CONTENT"> |
61 | <p>If passed a value, this method sets the x component of the rectangle; |
62 | if not, it returns the x component of the rectangle:</p> |
63 | <pre> my $x = $rect->x; # 255 |
64 | $rect->x(128); |
65 | |
66 | </pre> |
67 | |
68 | </div> |
69 | <h2 id="y">y</h2> |
70 | <div id="y_CONTENT"> |
71 | <p>If passed a value, this method sets the y component of the rectangle; |
72 | if not, it returns the y component of the rectangle:</p> |
73 | <pre> my $y = $rect->y; # 255 |
74 | $rect->y(128); |
75 | |
76 | </pre> |
77 | |
78 | </div> |
79 | <h2 id="w">w</h2> |
80 | <div id="w_CONTENT"> |
81 | <p>If passed a value, this method sets the w component of the rectangle; |
82 | if not, it returns the w component of the rectangle:</p> |
83 | <pre> my $w = $rect->w; # 255 |
84 | $rect->w(128); |
85 | |
86 | </pre> |
87 | |
88 | </div> |
89 | <h2 id="h">h</h2> |
90 | <div id="h_CONTENT"> |
91 | <p>If passed a value, this method sets the h component of the rectangle; |
92 | if not, it returns the h component of the rectangle:</p> |
93 | <pre> my $h = $rect->h; # 255 |
94 | $rect->h(128); |
95 | |
96 | </pre> |
97 | |
98 | </div> |
99 | <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p> |
100 | <div id="SEE_ALSO_CONTENT"> |
101 | <p><cite>SDL::Surface</cite></p> |
102 | |
103 | </div> |
104 | </div> |