X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-GFX-Primitives.html-inc;h=fb0a56d6be47a16e9fd3c3bb3d9701138717d38f;hb=25fbbc5b1925a2d0566e3c63b941bae6fe4751d3;hp=832d3667c17eb3e21bb8e1487da09408e06ab970;hpb=b5d537cc3daf6b56e3b7b33a40aec03c1549c921;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-GFX-Primitives.html-inc b/pages/SDL-GFX-Primitives.html-inc index 832d366..fb0a56d 100644 --- a/pages/SDL-GFX-Primitives.html-inc +++ b/pages/SDL-GFX-Primitives.html-inc @@ -54,7 +54,9 @@

DESCRIPTION

Top

-

All color values for the _color functions are 0xRRGGBBAA (32bit), even if the surface uses e. g. 8bit colors.

+

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 SDL::Video::set_video_mode or can be an SDL::App.

+

The color values for the _color functions are 0xRRGGBBAA (32bit), even if the surface uses e. g. 8bit colors.

METHODS

Top

@@ -73,10 +75,10 @@ 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