SDL::Surface - Graphic surface structure. Access to SDL_Surface
.
The main surface (display) is provided by SDL::Video::set_video_mode. 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 ( surface, ... );
An SDL_Surface
defines a surfaceangular area of pixels.
The constructor creates a new surface with the specified parameter values.
my $surface = SDL::Surface->new( ... );
The constructor creates a new surface with the specified parameter values.
my $surface = SDL::Surface->new_from( $old_surface, ... );
SDL::Surface width are defined at construction. Thus the following is read only.
my $w = $surface->w;
SDL::Surface height are defined at construction. Thus the following is read only.
my $h = $surface->h;
SDL, SDL::PixelFormat, SDL::Video