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