fix category
[sdlgit/SDL-Site.git] / pages / SDL-Surface.html-inc
CommitLineData
162a0989 1<div class="pod">
2<!-- INDEX START -->
3<h3 id="TOP">Index</h3>
4
c5cfaf97 5<ul><li><a href="#NAME">NAME</a></li>
6<li><a href="#CATEGORY">CATEGORY</a></li>
162a0989 7<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
8<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
9<li><a href="#METHODS">METHODS</a>
10<ul><li><a href="#new_flags_width_height_depth_Rmask_G">new ( flags, width, height, depth, Rmask, Gmask, Bmask, Amask )</a></li>
11<li><a href="#new_from_surface_width_height_depth_">new_from ( surface, width, height, depth, Rmask, Gmask, Bmask, Amask )</a>
12<ul><li><a href="#Construtor_Parameters">Construtor Parameters</a></li>
13</ul>
14</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">
c5cfaf97 26<p>SDL::Surface - Graphic surface structure.</p>
162a0989 27
28</div>
c5cfaf97 29<h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
bfdd9c2e 30<div id="CATEGORY_CONTENT">
31<p>Core, Video, Structure</p>
32
bfdd9c2e 33</div>
162a0989 34<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
35<div id="SYNOPSIS_CONTENT">
46beffd8 36<p>The main surface (display) is provided by <a href="/SDL-Video::set_video_mode.html">SDL::Video::set_video_mode</a>.
162a0989 37 use SDL; #provides flags &amp; constants
38 use SDL::Video; #provides access to set_video_mode
39 use SDL::Surface; #provides access to SDL_Surface struct internals</p>
40<pre> SDL::init(SDL_INIT_VIDEO);
41 my $display = SDL::Video::set_video_mode();
42
43</pre>
44<p>All surfaces constructed from now on are attached to the $display. There are two constructors available to do this.</p>
45<pre> my $surface = SDL::Surface-&gt;new ( ... );
46 my $surface2 = SDL::Surface-&gt;new_from ( surface, ... );
47
48</pre>
49
50</div>
51<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
52<div id="DESCRIPTION_CONTENT">
53<p>An <code>SDL_Surface</code> defines a surfaceangular area of pixels.</p>
54
55</div>
56<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
57<div id="METHODS_CONTENT">
58
59</div>
60<h2 id="new_flags_width_height_depth_Rmask_G">new ( flags, width, height, depth, Rmask, Gmask, Bmask, Amask )</h2>
61<div id="new_flags_width_height_depth_Rmask_G-2">
62<p>The constructor creates a new surface with the specified parameter values.</p>
63<pre> my $surface = SDL::Surface-&gt;new( ... );
64
65</pre>
66
67</div>
68<h2 id="new_from_surface_width_height_depth_">new_from ( surface, width, height, depth, Rmask, Gmask, Bmask, Amask )</h2>
69<div id="new_from_surface_width_height_depth_-2">
70<p>The constructor creates a new surface with the specified parameter values. </p>
71<pre> my $surface = SDL::Surface-&gt;new_from( $old_surface, ... );
72
ecabf8b7 73
74
75
162a0989 76</pre>
162a0989 77
78</div>
79<h3 id="Construtor_Parameters">Construtor Parameters</h3>
80<div id="Construtor_Parameters_CONTENT">
81
82
83
84
85
86
87
88
89</div>
90<h2 id="w">w</h2>
91<div id="w_CONTENT">
92<p>SDL::Surface width are defined at construction. Thus the following is read only. </p>
93<pre> my $w = $surface-&gt;w;
94
95</pre>
96
97</div>
98<h2 id="h">h</h2>
99<div id="h_CONTENT">
100<p>SDL::Surface height are defined at construction. Thus the following is read only. </p>
101<pre> my $h = $surface-&gt;h;
102
103</pre>
104
105</div>
106<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
107<div id="SEE_ALSO_CONTENT">
12f774ac 108<p><a href="/SDL.html">SDL</a>, <a href="/SDL-PixelFormat.html">SDL::PixelFormat</a>, <a href="/SDL-Video.html">SDL::Video</a> </p>
162a0989 109
110</div>
111</div>