3 <h3 id="TOP">Index</h3>
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>
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>
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>
39 <h1 id="CATEGORY">CATEGORY </h1><p><a href="#TOP" class="toplink">Top</a></p>
40 <div id="CATEGORY_CONTENT">
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;
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'} );
57 # creating the manager that holds the layers
58 my $layermanager = SDLx::LayerManager->new();
59 $layermanager->add( $layer1 );
60 $layermanager->add( $layer2 );
62 my $display = # create your video surface here
64 $layermanager->blit( $display );
66 # accessing the layer at point(x,y)
67 print( $layermanager->by_position( 150, 200 )->data->{userdata} ); # should print '42'
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>
77 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
78 <div id="METHODS_CONTENT">
82 <div id="new_CONTENT">
86 <div id="add_CONTENT">
89 <h2 id="layers">layers</h2>
90 <div id="layers_CONTENT">
93 <h2 id="layer">layer</h2>
94 <div id="layer_CONTENT">
97 <h2 id="length">length</h2>
98 <div id="length_CONTENT">
101 <h2 id="blit">blit</h2>
102 <div id="blit_CONTENT">
105 <h2 id="by_position">by_position</h2>
106 <div id="by_position_CONTENT">
107 <pre> my $layer = $layermanager->by_position( $x, $y );
112 <h2 id="ahead">ahead</h2>
113 <div id="ahead_CONTENT">
116 <h2 id="behind">behind</h2>
117 <div id="behind_CONTENT">
120 <h2 id="attach">attach</h2>
121 <div id="attach_CONTENT">
124 <h2 id="detach_xy">detach_xy</h2>
125 <div id="detach_xy_CONTENT">
128 <h2 id="detach_back">detach_back</h2>
129 <div id="detach_back_CONTENT">
132 <h2 id="foreground">foreground</h2>
133 <div id="foreground_CONTENT">
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>
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>
146 <h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
147 <div id="AUTHOR_CONTENT">
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>
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>