added more stuff
[sdlgit/SDL-Site.git] / htdocs / assets / SDL-Surface.html-inc
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_flags_width_height_depth_Rmask_G">new ( flags, width, height, depth, Rmask, Gmask, Bmask, Amask )</a></li>
10 <li><a href="#new_from_surface_width_height_depth_">new_from ( surface, width, height, depth, Rmask, Gmask, Bmask, Amask )</a>
11 <ul><li><a href="#Construtor_Parameters">Construtor Parameters</a></li>
12 </ul>
13 </li>
14 <li><a href="#w">w</a></li>
15 <li><a href="#h">h</a></li>
16 </ul>
17 </li>
18 <li><a href="#SEE_ALSO">SEE ALSO</a>
19 </li>
20 </ul><hr />
21 <!-- INDEX END -->
22
23 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
24 <div id="NAME_CONTENT">
25 <p>SDL::Surface - Graphic surface structure. Access to <code>SDL_Surface</code>.</p>
26
27 </div>
28 <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
29 <div id="SYNOPSIS_CONTENT">
30 <p>The main surface (display) is provided by <cite>SDL::Video::set_video_mode</cite>.
31   use SDL; #provides flags &amp; constants
32   use SDL::Video; #provides access to set_video_mode
33   use SDL::Surface; #provides access to SDL_Surface struct internals</p>
34 <pre>  SDL::init(SDL_INIT_VIDEO); 
35   my $display = SDL::Video::set_video_mode(); 
36
37 </pre>
38 <p>All surfaces constructed from now on are attached to the $display. There are two constructors available to do this.</p>
39 <pre>  my $surface  = SDL::Surface-&gt;new ( ... ); 
40   my $surface2 = SDL::Surface-&gt;new_from ( surface, ... ); 
41
42 </pre>
43
44 </div>
45 <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
46 <div id="DESCRIPTION_CONTENT">
47 <p>An <code>SDL_Surface</code> defines a surfaceangular area of pixels.</p>
48
49 </div>
50 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
51 <div id="METHODS_CONTENT">
52
53 </div>
54 <h2 id="new_flags_width_height_depth_Rmask_G">new ( flags, width, height, depth, Rmask, Gmask, Bmask, Amask )</h2>
55 <div id="new_flags_width_height_depth_Rmask_G-2">
56 <p>The constructor creates a new surface with the specified parameter values.</p>
57 <pre>    my $surface = SDL::Surface-&gt;new( ... );
58
59 </pre>
60
61 </div>
62 <h2 id="new_from_surface_width_height_depth_">new_from ( surface, width, height, depth, Rmask, Gmask, Bmask, Amask )</h2>
63 <div id="new_from_surface_width_height_depth_-2">
64 <p>The constructor creates a new surface with the specified parameter values. </p>
65 <pre>    my $surface = SDL::Surface-&gt;new_from( $old_surface, ... );
66
67 </pre>
68 <p>THIS WILL SEGFAULT!!! Read: http://sdlperl.ath.cx/projects/SDLPerl/ticket/53 </p>
69
70 </div>
71 <h3 id="Construtor_Parameters">Construtor Parameters</h3>
72 <div id="Construtor_Parameters_CONTENT">
73
74
75
76
77
78
79
80
81 </div>
82 <h2 id="w">w</h2>
83 <div id="w_CONTENT">
84 <p>SDL::Surface width are defined at construction. Thus the following is read only. </p>
85 <pre>  my $w = $surface-&gt;w; 
86
87 </pre>
88
89 </div>
90 <h2 id="h">h</h2>
91 <div id="h_CONTENT">
92 <p>SDL::Surface height are defined at construction. Thus the following is read only. </p>
93 <pre>  my $h = $surface-&gt;h; 
94
95 </pre>
96
97 </div>
98 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
99 <div id="SEE_ALSO_CONTENT">
100 <p><cite>SDL</cite>, <cite>SDL::PixelFormat</cite>, <cite>SDL::Video</cite> </p>
101
102 </div>
103 </div>