constants in docs
[sdlgit/SDL-Site.git] / pages / SDL-GFX-Primitives.html-inc
index 832d366..fb0a56d 100644 (file)
@@ -54,7 +54,9 @@
 </div>
 <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="DESCRIPTION_CONTENT">
-<p>All <code>color</code> values for the <code>_color</code> functions are <code>0xRRGGBBAA</code> (32bit), even if the surface uses e. g. 8bit colors.</p>
+<p>All functions take an SDL::Surface object as first parameter. This can be a new surface that will be blittet afterwads, can be an surface 
+obtained by <a href="/SDL-Video.html#set_video_mode">SDL::Video::set_video_mode</a> or can be an <a href="SDL-App.html">SDL::App</a>.</p>
+<p>The <code>color</code> values for the <code>_color</code> functions are <code>0xRRGGBBAA</code> (32bit), even if the surface uses e. g. 8bit colors.</p>
 
 </div>
 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
  use SDL::Surface;
  use SDL::GFX::Primitives;
 
- my $display = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE);
+ my $surface = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE);
 
- SDL::GFX::Primitives::pixel_color($display, 2, 2, 0xFF0000FF);             # red pixcel
- SDL::GFX::Primitives::pixel_RGBA( $display, 4, 4, 0x00, 0xFF, 0x00, 0xFF); # green pixel
+ SDL::GFX::Primitives::pixel_color($surface, 2, 2, 0xFF0000FF);             # red pixcel
+ SDL::GFX::Primitives::pixel_RGBA( $surface, 4, 4, 0x00, 0xFF, 0x00, 0xFF); # green pixel
 
 </pre>