From: Kartik Thakore Date: Wed, 4 Nov 2009 14:29:37 +0000 (-0500) Subject: Added preliminary docs for SDL::Surface X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a1a915e81e99409984f438dfb16db665946898e8;p=sdlgit%2FSDL_perl.git Added preliminary docs for SDL::Surface --- diff --git a/lib/pods/SDL/Surface.pod b/lib/pods/SDL/Surface.pod new file mode 100644 index 0000000..ff53dd5 --- /dev/null +++ b/lib/pods/SDL/Surface.pod @@ -0,0 +1,51 @@ +=pod + +=head1 NAME + +SDL::Surface - Graphic surface structure. Access to C. + +=head1 SYNOPSIS + +The main surface (display) is provided by L. + use SDL; #provides flags & constants + use SDL::Video; #provides access to set_video_mode + use SDL::Surface; #provides access to SDL_Surface struct internals + + SDL::init(SDL_INIT_VIDEO); + my $display = SDL::Video::set_video_mode(); + +All surfaces constructed from now on are attached to the $display. There are two constructors available to do this. + + my $surface = SDL::Surface->new ( ... ); + my $surface2 = SDL::Surface->new_from ( ... ); + +=head1 DESCRIPTION + +An C defines a surfaceangular area of pixels. + +=head1 METHODS + +=head2 new ( flags, width, height, depth, Rmask, Gmask, Bmask, Amask ) + +The constructor creates a new surface with the specified x, y, w, h +values: + + my $surface = SDL::Surface->new( ... ); + +=head2 w + +SDL::Surface width are defined at construction. Thus the following is read only. + + my $w = $surface->w; + +=head2 h + +SDL::Surface height are defined at construction. Thus the following is read only. + + my $h = $surface->h; + +=head1 SEE ALSO + +L, L, L + +=cut