Commit | Line | Data |
285d0cd2 |
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="#CATEGORY">CATEGORY </a></li> |
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">new</a></li> |
11 | <li><a href="#add">add</a></li> |
12 | <li><a href="#layers">layers</a></li> |
13 | <li><a href="#layer">layer</a></li> |
14 | <li><a href="#length">length</a></li> |
15 | <li><a href="#blit">blit</a></li> |
16 | <li><a href="#by_position">by_position</a></li> |
17 | <li><a href="#ahead">ahead</a></li> |
18 | <li><a href="#behind">behind</a></li> |
19 | <li><a href="#attach">attach</a></li> |
20 | <li><a href="#detach_xy">detach_xy</a></li> |
21 | <li><a href="#detach_back">detach_back</a></li> |
22 | <li><a href="#foreground">foreground</a></li> |
23 | </ul> |
24 | </li> |
25 | <li><a href="#BUGS">BUGS</a></li> |
26 | <li><a href="#SUPPORT">SUPPORT</a></li> |
27 | <li><a href="#AUTHOR">AUTHOR</a></li> |
28 | <li><a href="#COPYRIGHT">COPYRIGHT</a></li> |
29 | <li><a href="#SEE_ALSO">SEE ALSO</a> |
30 | </li> |
31 | </ul><hr /> |
32 | <!-- INDEX END --> |
33 | |
34 | <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p> |
35 | <div id="NAME_CONTENT"> |
36 | <p>SDLx::LayerManager - Extension for managing layers in a 2D world</p> |
37 | |
38 | </div> |
39 | <h1 id="CATEGORY">CATEGORY </h1><p><a href="#TOP" class="toplink">Top</a></p> |
40 | <div id="CATEGORY_CONTENT"> |
41 | <p>Extension</p> |
42 | |
43 | </div> |
44 | <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
45 | <div id="SYNOPSIS_CONTENT"> |
46 | <pre> use SDLx::Layer; |
47 | use SDLx::LayerManager; |
48 | |
49 | use SDL::Image; |
50 | use SDL::Surface; |
51 | use SDL::Video; |
52 | |
53 | # creating layers |
54 | my $layer1 = SDLx::Layer->new( SDL::Image::load('image1.png'), {userdata => '7'} ); |
55 | my $layer2 = SDLx::Layer->new( SDL::Image::load('image2.png'), 100, 200, {userdata => '42'} ); |
56 | |
57 | # creating the manager that holds the layers |
58 | my $layermanager = SDLx::LayerManager->new(); |
59 | $layermanager->add( $layer1 ); |
60 | $layermanager->add( $layer2 ); |
61 | |
62 | my $display = # create your video surface here |
63 | |
64 | $layermanager->blit( $display ); |
65 | |
66 | # accessing the layer at point(x,y) |
67 | print( $layermanager->by_position( 150, 200 )->data->{userdata} ); # should print '42' |
68 | |
69 | </pre> |
70 | |
71 | </div> |
72 | <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p> |
73 | <div id="DESCRIPTION_CONTENT"> |
74 | <p>The LayerManager ...</p> |
75 | |
76 | </div> |
77 | <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
78 | <div id="METHODS_CONTENT"> |
79 | |
80 | </div> |
81 | <h2 id="new">new</h2> |
82 | <div id="new_CONTENT"> |
83 | |
84 | </div> |
85 | <h2 id="add">add</h2> |
86 | <div id="add_CONTENT"> |
87 | |
88 | </div> |
89 | <h2 id="layers">layers</h2> |
90 | <div id="layers_CONTENT"> |
91 | |
92 | </div> |
93 | <h2 id="layer">layer</h2> |
94 | <div id="layer_CONTENT"> |
95 | |
96 | </div> |
97 | <h2 id="length">length</h2> |
98 | <div id="length_CONTENT"> |
99 | |
100 | </div> |
101 | <h2 id="blit">blit</h2> |
102 | <div id="blit_CONTENT"> |
103 | |
104 | </div> |
105 | <h2 id="by_position">by_position</h2> |
106 | <div id="by_position_CONTENT"> |
107 | <pre> my $layer = $layermanager->by_position( $x, $y ); |
108 | |
109 | </pre> |
110 | |
111 | </div> |
112 | <h2 id="ahead">ahead</h2> |
113 | <div id="ahead_CONTENT"> |
114 | |
115 | </div> |
116 | <h2 id="behind">behind</h2> |
117 | <div id="behind_CONTENT"> |
118 | |
119 | </div> |
120 | <h2 id="attach">attach</h2> |
121 | <div id="attach_CONTENT"> |
122 | |
123 | </div> |
124 | <h2 id="detach_xy">detach_xy</h2> |
125 | <div id="detach_xy_CONTENT"> |
126 | |
127 | </div> |
128 | <h2 id="detach_back">detach_back</h2> |
129 | <div id="detach_back_CONTENT"> |
130 | |
131 | </div> |
132 | <h2 id="foreground">foreground</h2> |
133 | <div id="foreground_CONTENT"> |
134 | |
135 | </div> |
136 | <h1 id="BUGS">BUGS</h1><p><a href="#TOP" class="toplink">Top</a></p> |
137 | <div id="BUGS_CONTENT"> |
138 | <p>Report at sdlperl.ath.cx</p> |
139 | |
140 | </div> |
141 | <h1 id="SUPPORT">SUPPORT</h1><p><a href="#TOP" class="toplink">Top</a></p> |
142 | <div id="SUPPORT_CONTENT"> |
143 | <p>#sdl irc.perl.org</p> |
144 | |
145 | </div> |
146 | <h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p> |
147 | <div id="AUTHOR_CONTENT"> |
148 | <pre> Tobias Leich |
149 | CPAN ID: FROGGS |
150 | --- |
151 | froggs@cpan.org |
152 | http://sdl.perl.org |
153 | |
154 | </pre> |
155 | |
156 | </div> |
157 | <h1 id="COPYRIGHT">COPYRIGHT</h1><p><a href="#TOP" class="toplink">Top</a></p> |
158 | <div id="COPYRIGHT_CONTENT"> |
159 | <p>This program is free software; you can redistribute |
160 | it and/or modify it under the same terms as Perl itself.</p> |
161 | <p>The full text of the license can be found in the |
162 | LICENSE file included with this module.</p> |
163 | |
164 | |
165 | |
166 | |
167 | |
168 | </div> |
169 | <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p> |
170 | <div id="SEE_ALSO_CONTENT"> |
171 | <p>perl(1), SDL(2).</p> |
172 | |
173 | </div> |
174 | </div> |