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