fixed url-generator
[sdlgit/SDL-Site.git] / pages / SDL-Rect.html-inc
CommitLineData
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>
12<ul><li><a href="#new_x_y_w_h">new ( $x, $y, $w, $h )</a></li>
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">
36<pre> my $rect = SDL::Rect-&gt;new( 0, 0, 0, 0 );
37 $rect-&gt;x(1);
38 $rect-&gt;y(2);
39 $rect-&gt;w(3);
40 $rect-&gt;h(4);
41 my $x = $rect-&gt;x; # 1
42 my $y = $rect-&gt;y; # 2
43 my $w = $rect-&gt;w; # 3
44 my $h = $rect-&gt;h; # 4
45
46</pre>
47
48</div>
49<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
50<div id="DESCRIPTION_CONTENT">
51<p>An <code>SDL_Rect</code> defines a rectangular area of pixels.</p>
52
53</div>
54<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
55<div id="METHODS_CONTENT">
56
57</div>
58<h2 id="new_x_y_w_h">new ( $x, $y, $w, $h )</h2>
59<div id="new_x_y_w_h_CONTENT">
60<p>The constructor creates a new rectangle with the specified x, y, w, h
61values:</p>
62<pre> my $rect = SDL::Rect-&gt;new( 0, 0, 0, 0 );
63
64</pre>
65
66</div>
67<h2 id="x">x</h2>
68<div id="x_CONTENT">
69<p>If passed a value, this method sets the x component of the rectangle;
70if not, it returns the x component of the rectangle:</p>
71<pre> my $x = $rect-&gt;x; # 255
72 $rect-&gt;x(128);
73
74</pre>
75
76</div>
77<h2 id="y">y</h2>
78<div id="y_CONTENT">
79<p>If passed a value, this method sets the y component of the rectangle;
80if not, it returns the y component of the rectangle:</p>
81<pre> my $y = $rect-&gt;y; # 255
82 $rect-&gt;y(128);
83
84</pre>
85
86</div>
87<h2 id="w">w</h2>
88<div id="w_CONTENT">
89<p>If passed a value, this method sets the w component of the rectangle;
90if not, it returns the w component of the rectangle:</p>
91<pre> my $w = $rect-&gt;w; # 255
92 $rect-&gt;w(128);
93
94</pre>
95
96</div>
97<h2 id="h">h</h2>
98<div id="h_CONTENT">
99<p>If passed a value, this method sets the h component of the rectangle;
100if not, it returns the h component of the rectangle:</p>
101<pre> my $h = $rect-&gt;h; # 255
102 $rect-&gt;h(128);
103
104</pre>
105
106</div>
107<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
108<div id="SEE_ALSO_CONTENT">
55bbf7a2 109<p><a href="SDL-Surface.html">SDL::Surface</a></p>
162a0989 110
111</div>
112</div>