From: Tobias Leich Date: Wed, 17 Mar 2010 21:14:18 +0000 (+0100) Subject: fixed url-generator X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=55bbf7a209993f4172fd7e6555dda0947b844089;p=sdlgit%2FSDL-Site.git fixed url-generator --- diff --git a/pages/SDL-App.html-inc b/pages/SDL-App.html-inc index d1d8868..2e3ac92 100644 --- a/pages/SDL-App.html-inc +++ b/pages/SDL-App.html-inc @@ -68,8 +68,8 @@ An alternative to the manual Event processing is the L<SDL::App::loop> .

DESCRIPTION

Top

-

SDL::App controls the root window of the of your SDL based application. -It extends the SDL::Surface class, and provides an interface to the window +

SDL::App controls the root window of the of your SDL based application. +It extends the SDL::Surface class, and provides an interface to the window manager oriented functions.

@@ -195,7 +195,7 @@ Kartik Thakore

SEE ALSO

Top

-

perl SDL::Surface SDL::Event SDL::OpenGL

+

perl SDL::Surface SDL::Event SDL::OpenGL

\ No newline at end of file diff --git a/pages/SDL-Audio.html-inc b/pages/SDL-Audio.html-inc index dbc9aaa..1b87ea2 100644 --- a/pages/SDL-Audio.html-inc +++ b/pages/SDL-Audio.html-inc @@ -64,7 +64,7 @@ -
The desired audio format. See SDL::AudioSpec
+
The desired audio format. See SDL::AudioSpec
    $desired->format
 
@@ -100,7 +100,7 @@
 	

SDL::Audio::open reads these fields from the desired SDL::AudioSpec structure passed to the function and attempts to find an audio configuration matching your desired. As mentioned above, if the obtained parameter is NULL then SDL with convert from your desired audio settings to the hardware settings as it plays.

-

If obtained is NULL then the desired SDL::AudioSpec is your working specification, otherwise the obtained SDL::AudioSpec becomes the working specification and the desired specification can be deleted. The data in the working specification is used when building SDL::AudioCVT's for converting loaded data to the hardware format.

+

If obtained is NULL then the desired SDL::AudioSpec is your working specification, otherwise the obtained SDL::AudioSpec becomes the working specification and the desired specification can be deleted. The data in the working specification is used when building SDL::AudioCVT's for converting loaded data to the hardware format.

SDL::Audio::open calculates the size and silence fields for both the $desired and $obtained specifications. The size field stores the total size of the audio buffer in bytes, while the silence stores the value used to represent silence in the audio buffer

The audio device starts out playing silence when it's opened, and should be enabled for playing by calling SDL::Audio::pause(0) when you are ready for your audio callback function to be called. Since the audio driver may modify the requested size of the audio buffer, you should allocate any local mixing buffers after you open the audio device.

diff --git a/pages/SDL-CD.html-inc b/pages/SDL-CD.html-inc index fa9610e..18cb0fd 100644 --- a/pages/SDL-CD.html-inc +++ b/pages/SDL-CD.html-inc @@ -226,7 +226,7 @@
 my $track =  $CD->track($number);
 
 
-

Retrives track description of track $number in CD. See SDL::CDTrack.

+

Retrives track description of track $number in CD. See SDL::CDTrack.

@@ -235,7 +235,7 @@

SEE ALSO

Top

-

SDL::CDROM, SDL::CDTrack

+

SDL::CDROM, SDL::CDTrack

\ No newline at end of file diff --git a/pages/SDL-CDROM.html-inc b/pages/SDL-CDROM.html-inc index f950875..0e17498 100644 --- a/pages/SDL-CDROM.html-inc +++ b/pages/SDL-CDROM.html-inc @@ -75,7 +75,7 @@

See Also

Top

-

SDL::CD, SDL::CDTrack

+

SDL::CD, SDL::CDTrack

\ No newline at end of file diff --git a/pages/SDL-CDTrack.html-inc b/pages/SDL-CDTrack.html-inc index 73ec8e9..aa75b60 100644 --- a/pages/SDL-CDTrack.html-inc +++ b/pages/SDL-CDTrack.html-inc @@ -98,7 +98,7 @@

SEE ALSO

Top

-

SDL::CDROM, SDL::CD

+

SDL::CDROM, SDL::CD

\ No newline at end of file diff --git a/pages/SDL-Color.html-inc b/pages/SDL-Color.html-inc index c13455c..fe9ab3b 100644 --- a/pages/SDL-Color.html-inc +++ b/pages/SDL-Color.html-inc @@ -94,7 +94,7 @@ if not, it returns the blue component of the color:

SEE ALSO

Top

-

SDL::Surface

+

SDL::Surface

\ No newline at end of file diff --git a/pages/SDL-Cursor.html-inc b/pages/SDL-Cursor.html-inc index a7fac08..289bf2e 100644 --- a/pages/SDL-Cursor.html-inc +++ b/pages/SDL-Cursor.html-inc @@ -114,7 +114,7 @@ and in your main loop, when you draw graphics, also draw a SDL::Surface

SEE ALSO

Top

\ No newline at end of file diff --git a/pages/SDL-Events.html-inc b/pages/SDL-Events.html-inc index 3f76c29..32a08a6 100644 --- a/pages/SDL-Events.html-inc +++ b/pages/SDL-Events.html-inc @@ -26,11 +26,20 @@ -
  • set_event_filter
  • +
  • set_event_filter + +
  • get_key_state
  • -
  • get_mod_state
  • +
  • get_mod_state + +
  • set_mod_state
  • -
  • event_state
  • +
  • event_state + +
  • get_key_name
  • enable_unicode
  • enable_key_repeat
  • @@ -57,11 +66,12 @@

    SYNOPSIS

    Top

    -

    Most likely you just want to know how to get events for you app. - use SDL; +

    Most likely you just want to know how to get events for you app.

    +
      use SDL;
       use SDL::Event;
    -  use SDL::Events;

    -
      SDL::init(SDL_INIT_VIDEO); # Event can only be grabbed in the same thread as this 
    +  use SDL::Events;
    +
    +  SDL::init(SDL_INIT_VIDEO); # Event can only be grabbed in the same thread as this 
     
       ...
     
    @@ -138,7 +148,7 @@ However, if you are not polling or waiting for events (e.g. you are filtering th
     

    poll_event($event)

    Polls for currently pending events.

    -

    If $event is not NULL, the next event is removed from the queue and stored in the SDL::Event structure pointed to by $event.

    +

    If $event is not NULL, the next event is removed from the queue and stored in the SDL::Event structure pointed to by $event.

    As this function implicitly calls pump_events, you can only call this function in the thread that set the video mode with SDL::Video::set_video_mode.

    @@ -175,59 +185,269 @@ The event is copied into the queue, and the caller may dispose of the memory poi

    set_event_filter

    +

    Sets up a filter to process all events

    +
    	my $filter = sub { if($_[0]->type == SDL_ACTIVEEVENT){ return 0} else{ return 1; }};
    +
    +	SDL::Events::set_event_filter($filter);
    +
    +
    + +
    +

    PARAMETER

    +
    +

    set_event_filter takes a coderef that it checks all events again. The callback gets a event in the stack

    +
    	sub { my $event_to_test = shift; ...}
    +
    +
    +

    to filter the event return a 0, to pass the filter return a 1.

    +

    One Caveat is if you are filterign SDL_QUITEVENT the event will be filtered if it is non-intterupt call ( Window closes normally ). If it is a interrupt SDL_QUITEVENT it will be process on the next event poll.

    +

    Events pushed onto to the queue with SDL::Events::push_events or SDL::Events::peep_events do not get filtered.

    +

    This callback may run in a different thread.

    get_key_state

    +

    Get a snapshot of the current keyboard state

    +
    	my $keys_ref = SDL::Events::get_key_state();
    +
    +	print $keys_ref->[SDLK_RETURN]; # 1 if pressed , 0 if not pressed
    +
    +
    +

    Use SDL::Events::pump_events to update the state array.

    +

    This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the get_key_state call.

    +

    This function doesn't take into account whether shift has been pressed or not.

    get_mod_state

    +

    Get the state of the modifier keys

    +

    Returns the current state of modifier keys

    +

    Return value is an OR'd combination of KMOD_*

    +
     SDL::Events::pump_events; #get latest mod_state in buffers
    +
    + my $mod_state = SDL::Events::get_mod_state();
    +
    + # Check which ones are pressed with 
    +
    + # no mod pressed?
    +
    + print 'no_mod' if  ( $mod_state & KMOD_NONE );
    +
    + # CTRL or ALT 
    +
    + print 'ctrl alt' if ($mod_state & KMOD_CTRL || $mod_state & KMOD_ALT );
    +
    +
    + +
    +

    MOD VALUES

    +
    +
    +
    KMOD_NONE
    +
    KMOD_LSHIFT
    +
    KMOD_RSHIFT
    +
    KMOD_LCTRL
    +
    KMOD_RCTRL
    +
    KMOD_LALT
    +
    KMOD_RALT
    +
    KMOD_LMETA
    +
    KMOD_RMETA
    +
    KMOD_NUM
    +
    KMOD_CAPS
    +
    KMOD_MODE
    +
    KMOD_CTRL
    +
    +

    same as KMOD_LCTRL|KMOD_RCTRL

    +
    +
    KMOD_SHIFT
    +
    +

    same as KMOD_LSHIFT|KMOD_RSHIFT

    +
    +
    KMOD_ALT
    +
    +

    same as KMOD_LALT|KMOD_RALT

    +
    +
    KMOD_META
    +
    +

    same as KMOD_LMETA|KMOD_RMETA

    +
    +

    set_mod_state

    +

    Get the state of the modifier keys

    +

    The inverse of SDL::Events::get_mod_state allows you to impose modifier key states on your application.

    +

    Simply pass your desired modifier states into $modstate. This value can be a OR'd combination of any KMOD* constant.

    +
     my $modstate = KMOD_LMETA | KMOD_LSHIFT;
    +
    +
    +

    Any KMOD_* constant see SDL::Events::get_mod_state for constants. + SDL::Events::set_mod_state( $modstate );

    event_state

    +

    Allows you to set the state of processing certain events

    +
     SDL::Events::event_state( $type, $state );
    +
    +
    +

    A list of $type(s) can be found in SDL::Event

    + +
    +

    STATES

    +
    +
    +
    SDL_IGNORE
    +
    +

    The event of $type will be automatically dropper from the event queue and will not be filtered.

    +
    +
    SDL_ENABLE
    +
    +

    The event of $type will be processed normally. This is default.

    +
    +
    SDL_QUERY
    +
    +

    The current processing state of the $type will be returned

    +
    +

    get_key_name

    +

    Gets the name of the a SDL virtual keysym

    +
     my $event = SDL::Event->new();
    +
    + while( SDL::Events::poll_event($event) )
    + {
    +   my $key = $event->key_sym;
    +   $key_str = SDL::Events::get_key_name($key);
    + }
    +
    +
    +

    Returns a string with the name of the key sym.

    enable_unicode

    +

    Enable/Disable UNICODE translation

    +
      my $previous_translation_mode = SDL::Events::enable_unicode( 1 ); #enable
    +     $previous_translation_mode = SDL::Events::enable_unicode( 0 ); #disables
    +
    +
    +

    To obtain the character codes corresponding to received keyboard events, Unicode translation must first be turned on using this function. The translation incurs a slight overhead for each keyboard event and is therefore disabled by default. For each subsequently recieved key down event, the unicode member of the SDL::Event::key_sym provided structure will be then contain the corresponding character code, or otherwise zero.

    +

    A value of 1 for enabling, 0 for disabling and -1 for unchanged. -1 is usefull for querying the current translation mode.

    +

    Only key press events will be translated not release events.

    +

    Returns the previous translation mode as (1,0).

    enable_key_repeat

    +

    Sets keyboard repeat rate

    +
     my $success = SDL::Events::enable_key_repeat( $delay, $interval );
    +
    +
    +

    Enables or disables the keyboard repeat rate. $delay specifies how long the key must be pressed before it begins repeating, it then repleats at the speed specified by $interval. Both $delay and $interval are expressed in milliseconds.

    +

    Setting $delay to 0 disables key repeating completely. Good default values are SDL_DEFAULT_REPEAT_DELAY and SDL_DEFAULT_REPEAT_INTERVAL.

    +

    Return 0 on success and -1 on fail.

    get_mouse_state

    +

    Retrives the current state of the mouse

    +
    	my ($mask,$x,$y) = @{ SDL::Events::get_mouse_state( ) };
    +
    +        print 'Button Left pressed' if ($mask & SDL_BUTTON_LMASK);    
    +
    +        print 'Button Right pressed' if ($mask & SDL_BUTTON_RMASK);   
    +
    +        print 'Button Middle pressed' if ($mask & SDL_BUTTON_MMASK);  
    +
    +        print $x.','.$y;
    +
    +
    +

    The current button state is returned as a button $bitmask, which can be tested using the the above constants

    get_relative_mouse_state

    +

    Retrives the current relative state of the mouse

    +
    	my ($mask,$x,$y) = @{ SDL::Events::get_mouse_state( ) };
    +
    +        print 'Button Left pressed' if ($mask & SDL_BUTTON_LMASK);    
    +
    +        print 'Button Right pressed' if ($mask & SDL_BUTTON_RMASK);   
    +
    +        print 'Button Middle pressed' if ($mask & SDL_BUTTON_MMASK);  
    +
    +        print $x.','.$y; # this is relative to the last postion of the mouse
    +
    +
    +

    The current button state is returned as a button $bitmask, which can be tested using the the above constants

    + + + +

    get_app_state

    +

    Gets the state of the application

    +
    	my $app_state = SDL::Events::get_app_state();
    +
    +
    +

    The $app_state is a bitwise combination of:

    +
    +
    SDL_APPMOUSEFOCUS
    +
    +

    Application has mouse focus

    +
    	warn 'mouse focus' if $app_state & SDL_APPMOUSEFOCUS
    +
    +
    +
    +
    SDL_APPINPUTFOCUS
    +
    +

    Application has keyboard focus

    +
    	warn 'keyboard focus' if $app_state & SDL_APPINPUTFOCUS
    +
    +
    +
    +
    +
    +
    +
    SDL_APPACTIVE
    +
    +

    Application is visible

    +
    	warn 'Application Visible' if $app_state & SDL_APPACTIVE
     
    -
    -

    joystick_event_state

    -
    + + +
    +

    joystick_event_state

    +
    +

    Enable/disable joystick event polling

    +
    	my $status = SDL::Events::joystick_event_state( $state );
     
    +
    +

    This function is used to enable or disable joystick event processing. With joystick event processing disabled you will have to update joystick states with SDL_JoystickUpdate and read the joystick information manually. $state can be:

    + +
    SDL_QUERY
    +
    SDL_ENABLE
    +
    SDL_IGNORE
    +
    +

    Joystick event handling is default. Even if joystick event processing is enabled, individual joysticks must be opened before they generate events

    +
    + +

    Warning: Calling this function may delete all events currently in SDL's event queue.

    +

    If $state is SDL_QUERY then the current state is returned, otherwise the new processing state is returned.

    SEE ALSO

    Top

    diff --git a/pages/SDL-Font.html-inc b/pages/SDL-Font.html-inc index 56a6737..538d304 100644 --- a/pages/SDL-Font.html-inc +++ b/pages/SDL-Font.html-inc @@ -30,8 +30,8 @@

    DESCRIPTION

    Top

    -

    SDL::Font provides an interface to loading and using SFont style -fonts with SDL::Surface objects.

    +

    SDL::Font provides an interface to loading and using SFont style +fonts with SDL::Surface objects.

    METHOD

    Top

    @@ -50,7 +50,7 @@ fonts with SDL::Surface objects.

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Game-Palette.html-inc b/pages/SDL-Game-Palette.html-inc index a7c6973..d3484bd 100644 --- a/pages/SDL-Game-Palette.html-inc +++ b/pages/SDL-Game-Palette.html-inc @@ -25,7 +25,7 @@

    DESCRIPTION

    Top

    -

    SDL::Palette provides an interface to the SDL_Palette structures, +

    SDL::Palette provides an interface to the SDL_Palette structures, and can be used to set the color values of an existing palette's indexes.

    @@ -65,7 +65,7 @@ and can be used to set the color values of an existing palette's indexes.

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Image.html-inc b/pages/SDL-Image.html-inc index c3a3166..8faed1e 100644 --- a/pages/SDL-Image.html-inc +++ b/pages/SDL-Image.html-inc @@ -147,9 +147,9 @@ HAM6, HAM8, and 24bit types are not supported.

    $file Image file name to load a surface from.

    -

    Load file for use as an image in a new SDL::Surface. This actually calls IMG_LoadTyped_RW the binded function to SDL::Image::load_typed_rw, with the file extension used as the type string. This can load all supported image files, including TGA as long as the filename ends with ".tga". It is best to call this outside of event loops, and rather keep the loaded images around until you are really done with them, as disk speed and image conversion to a surface is not that speedy. +

    Load file for use as an image in a new SDL::Surface. This actually calls IMG_LoadTyped_RW the binded function to SDL::Image::load_typed_rw, with the file extension used as the type string. This can load all supported image files, including TGA as long as the filename ends with ".tga". It is best to call this outside of event loops, and rather keep the loaded images around until you are really done with them, as disk speed and image conversion to a surface is not that speedy. Note: If the image format loader requires initialization, it will attempt to do that the first time it is needed if you have not already called SDL::Image::init to load support for your image format. -Note: If the image format supports a transparent pixel, SDL::Image will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling: +Note: If the image format supports a transparent pixel, SDL::Image will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling: SDL::Video::set_color_key

      my $image = SDL::Image::load( $some_png_file );
       SDL::Video::set_color_key($image, SDL_RLEACCEL, $image->format->colorkey);
    @@ -159,7 +159,7 @@ Note: If the image format supports a transparent pixel, SDL:
     
     

    Return

    -

    An image as a SDL::Surface. NULL is returned on errors, such as no support built for the image, or a file reading error. Use SDL::get_error to get cause of error.

    +

    An image as a SDL::Surface. NULL is returned on errors, such as no support built for the image, or a file reading error. Use SDL::get_error to get cause of error.

    load_typed_rw

    @@ -170,7 +170,7 @@ Note: If the image format supports a transparent pixel, SDL:
    src
    -

    The source SDL::RWops as a pointer. The image is loaded from this.

    +

    The source SDL::RWops as a pointer. The image is loaded from this.

    freesrc
    @@ -202,7 +202,7 @@ Note: If the image format supports a transparent pixel, SDL:

    Load src for use as a surface. This can load all supported image formats. This method does not guarantee that the format specified by type is the format of the loaded image, except in the case when TGA format is specified (or any other non-magicable format in the future). Using SDL_RWops is not covered here, but they enable you to load from almost any source. Note: If the image format loader requires initialization, it will attempt to do that the first time it is needed if you have not already called SDL::Image::init to load support for your image format. -Note: If the image format supports a transparent pixel, SDL::Image will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling: +Note: If the image format supports a transparent pixel, SDL::Image will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling: SDL::Video::set_color_key

    @@ -222,7 +222,7 @@ Note: If the image format supports a transparent pixel, SDL:

    Return

    -

    The image as a new SDL::Surface. NULL is returned on errors.

    +

    The image as a new SDL::Surface. NULL is returned on errors.

    is_[TYPE]

    @@ -243,7 +243,7 @@ Note: If the image format supports a transparent pixel, SDL:
    is_XPM
    is_XV
    -

    These functions take a SDL::RWOps as a parameter.

    +

    These functions take a SDL::RWOps as a parameter.

    Return

    @@ -281,12 +281,12 @@ Note: If the image format supports a transparent pixel, SDL:
    load_XPM_rw
    load_XV_rw
    -

    These functions take a SDL::RWop as a parameter

    +

    These functions take a SDL::RWop as a parameter

    Return

    -

    The image as a new SDL::Surface. NULL is returned on errors, like if the [TYPE] is not supported, or a read error.

    +

    The image as a new SDL::Surface. NULL is returned on errors, like if the [TYPE] is not supported, or a read error.

    Example

    @@ -314,7 +314,7 @@ Note: If the image format supports a transparent pixel, SDL:

    Return

    -

    The image as a new SDL::Surface. NULL is returned on errors, like if XPM is not supported, or a read error.

    +

    The image as a new SDL::Surface. NULL is returned on errors, like if XPM is not supported, or a read error.

    Example

    @@ -377,7 +377,7 @@ Note: If the image format supports a transparent pixel, SDL:

    Return

    -

    Returns a SDL::Version object

    +

    Returns a SDL::Version object

    Example

    @@ -449,7 +449,7 @@ Note: this function does not always set the error string, so do not depend on SD

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Mixer.html-inc b/pages/SDL-Mixer.html-inc index f963132..bb0e1e7 100644 --- a/pages/SDL-Mixer.html-inc +++ b/pages/SDL-Mixer.html-inc @@ -154,7 +154,7 @@ This function returns 1 as first array element (status) if the audio has been op

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Music.html-inc b/pages/SDL-Music.html-inc index 8094d99..4f4f651 100644 --- a/pages/SDL-Music.html-inc +++ b/pages/SDL-Music.html-inc @@ -17,7 +17,7 @@

    DESCRIPTION

    Top

    -

    SDL::Music is used to load music files for use with SDL::Mixer. +

    SDL::Music is used to load music files for use with SDL::Mixer. To load a music file one simply creates a new object passing the filename to the constructor:

    	my $music = new SDL::Music 'my_song.ogg';
    @@ -35,7 +35,7 @@ to the constructor:

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-OpenGL.html-inc b/pages/SDL-OpenGL.html-inc index f181f66..8114f34 100644 --- a/pages/SDL-OpenGL.html-inc +++ b/pages/SDL-OpenGL.html-inc @@ -25,7 +25,7 @@

    DESCRIPTION

    Top

    -

    SDL::OpenGL is a perl module which when used by your application +

    SDL::OpenGL is a perl module which when used by your application exports the gl* and glu* functions into your application's primary namespace. Most of the functions described in the OpenGL 1.3 specification are currently supported in this fashion. As the implementation of the OpenGL bindings that @@ -80,7 +80,7 @@ glCallLists, so you might want to pack your data like this:

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Palette.html-inc b/pages/SDL-Palette.html-inc index ed2b376..a420ef1 100644 --- a/pages/SDL-Palette.html-inc +++ b/pages/SDL-Palette.html-inc @@ -54,7 +54,7 @@ values of a SDL::Surface's palette can be set with the SDL::V

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-PixelFormat.html-inc b/pages/SDL-PixelFormat.html-inc index 707fe49..1e61b9f 100644 --- a/pages/SDL-PixelFormat.html-inc +++ b/pages/SDL-PixelFormat.html-inc @@ -61,7 +61,7 @@
    	$surface->format->palette;
     
     
    -

    Returns the SDL_Palette and SDL::Palette of the format of the surface.

    +

    Returns the SDL_Palette and SDL::Palette of the format of the surface.

    BitsPerPixel

    @@ -142,7 +142,7 @@

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Rect.html-inc b/pages/SDL-Rect.html-inc index ccb64a5..cdcd1ed 100644 --- a/pages/SDL-Rect.html-inc +++ b/pages/SDL-Rect.html-inc @@ -106,7 +106,7 @@ if not, it returns the h component of the rectangle:

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-SFont.html-inc b/pages/SDL-SFont.html-inc index a57f55b..d808c88 100644 --- a/pages/SDL-SFont.html-inc +++ b/pages/SDL-SFont.html-inc @@ -40,7 +40,7 @@

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Sound.html-inc b/pages/SDL-Sound.html-inc index 3c3977a..2f8dd88 100644 --- a/pages/SDL-Sound.html-inc +++ b/pages/SDL-Sound.html-inc @@ -28,8 +28,8 @@

    DESCRIPTION

    Top

    -

    SDL::Sound is a module for loading WAV files for sound effects. -The file can be loaded by creating a new SDL::Sound object by +

    SDL::Sound is a module for loading WAV files for sound effects. +The file can be loaded by creating a new SDL::Sound object by passing the filename to the constructor;

    	my $sound = new SDL::Sound 'my_sfx.wav';
     
    @@ -52,7 +52,7 @@ passing the filename to the constructor;

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Surface.html-inc b/pages/SDL-Surface.html-inc index 7772fc1..c8a6c49 100644 --- a/pages/SDL-Surface.html-inc +++ b/pages/SDL-Surface.html-inc @@ -183,7 +183,7 @@

    format

    -

    The format of the pixels stored in the surface. See SDL::PixelFormat

    +

    The format of the pixels stored in the surface. See SDL::PixelFormat

     my $format = $surface->format;
     
     
    @@ -263,7 +263,7 @@

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-TTF.html-inc b/pages/SDL-TTF.html-inc index 0b1624d..95fd772 100644 --- a/pages/SDL-TTF.html-inc +++ b/pages/SDL-TTF.html-inc @@ -1,9 +1,504 @@

    Index

    -
    + +
    +

    NAME

    Top

    +
    +

    SDL::TTF - True Type Font functions (libfreetype)

    + +
    +

    CATEGORY

    Top

    +
    +

    TODO, TTF

    + +
    +

    METHODS

    Top

    +
    + +
    +

    General methods

    +
    + +
    +

    linked_version

    +
    +
     my $version = SDL::TTF::linked_version();
    +
    +
    +

    This gives you the SDL::Version object which SDL_ttf lib is used on the system. +No prior initialization needs to be done before these function is called.

    +

    Example:

    +
     use SDL::TTF;
    + use SDL::Version;
    +
    + my $version = SDL::TTF::linked_version();
    +
    + printf("got version: %d.%d.%d\n", $version->major, $version->minor, $version->patch);
    +
    +
    + +
    +

    compile_time_version

    +
    +
     my $version = SDL::TTF::compile_time_version();
    +
    +
    +

    This gives you the SDL::Version object which SDL_ttf was present at compile time.

    + +
    +

    init

    +
    +
     my $success = SDL::TTF::init();
    +
    +
    +

    Initialize the truetype font API. +This must be called before using other functions in this library, except SDL::TTF::was_init and SDL::TTF::linked_version. +SDL does not have to be initialized before this call.

    +

    Returns: 0 on success, -1 on any error.

    + +
    +

    was_init

    +
    +
     my $was_init = SDL::TTF::was_init();
    +
    +
    +

    Query the initilization status of the truetype font API. +You may, of course, use this before SDL::TTF::init to avoid initializing twice in a row. Or use this to determine if you need to call +SDL::TTF::quit.

    + +
    +

    quit

    +
    +
     SDL::TTF::quit();
    +
    +
    +

    Shutdown and cleanup the truetype font API. +After calling this the SDL::TTF functions should not be used, excepting SDL::TTF::was_init. You may, of course, use SDL::TTF::init to +use the functionality again

    + +
    +

    Management functions

    +
    + +
    +

    open_font

    +
    +
     my $font = SDL::TTF::open_font($font_file, $point_size);
    +
    +
    +

    Load file for use as a font, at the given size. This is actually SDL::TTF::open_font_index(..., ..., $index = 0). This can load TTF and FON files.

    +

    Returns: a SDL::TTF::Font object. undef is returned on errors.

    +

    Example:

    +
     use SDL::TTF;
    + use SDL::TTF::Font;
    +
    + my $font = SDL::TTF::open_font('arial.ttf', '24);
    +
    +
    + +
    +

    open_font_index

    +
    +
     my $font = SDL::TTF::open_font($font_file, $point_size, $face_index);
    +
    +
    +

    This is the same as SDL::TTF::open_font, except you can specify the face index of a font file containing multiple faces. +This can load TTF and FON files.

    + +
    +

    open_font_RW

    +
    +
     my $font = SDL::TTF::open_font_RW($rwops_object, $free, $point_size);
    +
    +
    +

    This is the same as SDL::TTF::open_font, except you can pass an SDL::RWOps-object. If you pass true as $free, the SDL::RWOps-object +will be freed by SDL_ttf library. Don't do this, perl will free this object for you.

    +

    Example:

    +
     my $font = SDL::TTF::open_font_RW(SDL::RWOps->new_file($font_file, 'r'), 0, 24);
    +
    +
    + +
    +

    open_font_index_RW

    +
    +
     my $font = SDL::TTF::open_font_index_RW($rwops_object, $free, $point_size, $face_index);
    +
    +
    +

    This is the same as SDL::TTF::open_font_index, except you can pass an SDL::RWOps-object. If you pass true as $free, the +SDL::RWOps-object will be freed by SDL_ttf library. Don't do this, perl will free this object for you.

    + +
    +

    Attributes

    +
    + +
    +

    Global attributes

    +
    + +
    +

    byte_swapped_unicode

    +
    +
     SDL::TTF::byte_swapped_unicode( $bool );
    +
    +
    +

    This function tells SDL_ttf whether UNICODE (2 bytes per character) text is generally byteswapped. A UNICODE_BOM_NATIVE or +UNICODE_BOM_SWAPPED character in a string will temporarily override this setting for the remainder of that string, however this setting +will be restored for the next one. The default mode is non-swapped, native endianness of the CPU.

    + +
    +

    Font style

    +
    + +
    +

    get_font_style

    +
    +
     SDL::TTF::get_font_style($font);
    +
    +
    +

    Returns: The style as a bitmask composed of the following masks:

    +
      +
    • TTF_STYLE_NORMAL
    • +
    • TTF_STYLE_BOLD
    • +
    • TTF_STYLE_ITALIC
    • +
    • TTF_STYLE_UNDERLINE
    • +
    • TTF_STYLE_STRIKETHROUGH (since SDL_ttf 2.0.10)
    • +
    + +

    Example:

    +
     my $style = SDL::TTF::get_font_style($font);
    +
    + print("normal\n")        if $style == TTF_STYLE_NORMAL;
    + print("bold\n")          if $style  & TTF_STYLE_BOLD;
    + print("italic\n")        if $style  & TTF_STYLE_ITALIC;
    + print("underline\n")     if $style  & TTF_STYLE_UNDERLINE;
    + print("strikethrough\n") if $style  & TTF_STYLE_STRIKETHROUGH;
    +
    +
    + +
    +

    set_font_style

    +
    +
     SDL::TTF::set_font_style($font, $style);
    +
    +
    +

    Set the rendering style of the loaded font.

    +

    Note: TTF_STYLE_UNDERLINE may cause surfaces created by SDL::TTF::render_glyph_* functions to be extended vertically, downward only, +to encompass the underline if the original glyph metrics didn't allow for the underline to be drawn below. This does not change the math used +to place a glyph using glyph metrics. +On the other hand TTF_STYLE_STRIKETHROUGH doesn't extend the glyph, since this would invalidate the metrics used to position the glyph when +blitting, because they would likely be extended vertically upward. There is perhaps a workaround, but it would require programs to be smarter +about glyph blitting math than they are currently designed for. +Still, sometimes the underline or strikethrough may be outside of the generated surface, and thus not visible when blitted to the screen. In +this case, you should probably turn off these styles and draw your own strikethroughs and underlines.

    + +
    +

    Font settings

    +
    + +
    +

    get_font_hinting

    +
    +
     my $hinting = SDL::TTF::get_font_hinting($font);
    +
    +
    +

    Get the current hinting setting of the loaded font.

    +

    Note: at least SDL_ttf 2.0.10 needed

    +

    Returns the hinting type matching one of the following defined values:

    +
      +
    • TTF_HINTING_NORMAL
    • +
    • TTF_HINTING_LIGHT
    • +
    • TTF_HINTING_MONO
    • +
    • TTF_HINTING_NONE
    • +
    + + +
    +

    set_font_hinting

    +
    +
     SDL::TTF::set_font_hinting($font, $hinting);
    +
    +
    +

    Set the hinting of the loaded font. You should experiment with this setting if you know which font you are using beforehand, especially when +using smaller sized fonts. If the user is selecting a font, you may wish to let them select the hinting mode for that font as well.

    +

    Note: at least SDL_ttf 2.0.10 needed

    +

    Example:

    +
     SDL::TTF::set_font_hinting($font, TTF_HINTING_LIGHT);
    +
    +
    + +
    +

    get_font_kerning

    +
    +
     my $kerning_enabled = SDL::TTF::get_font_kerning($font);
    +
    +
    +

    Get the current kerning setting of the loaded font.

    +

    Returns: 0(zero) if kerning is disabled. A non-zero value is returned when enabled. The default for a newly loaded font is enabled(1).

    +

    Note: at least SDL_ttf 2.0.10 needed

    + +
    +

    set_font_kerning

    +
    +
     SDL::TTF::set_font_kerning($font, $kerning_enabled);
    +
    +
    +

    Set whether to use kerning when rendering the loaded font. This has no effect on individual glyphs, but rather when rendering whole strings of +characters, at least a word at a time. Perhaps the only time to disable this is when kerning is not working for a specific font, resulting in +overlapping glyphs or abnormal spacing within words.

    +

    Pass 0 to disable kerning, 1 to enable.

    +

    Note: at least SDL_ttf 2.0.10 needed

    + +
    +

    Font metrics

    +
    + +
    +

    font_height

    +
    +
     my $font_height = SDL::TTF::font_height($font);
    +
    +
    + +
    +

    font_ascent

    +
    +
     my $font_ascent = SDL::TTF::font_ascent($font);
    + like( $font_ascent,                                       '/^[-]?\d+$/',       "[font_ascent] offset from the baseline to the top of the font is $font_ascent" );
    +
    +
    + +
    +

    font_descent

    +
    +
     my $font_descent = SDL::TTF::font_descent($font);
    + like( $font_descent,                                      '/^[-]?\d+$/',       "[font_descent] offset from the baseline to the bottom of the font is $font_descent" );
    +
    +
    + +
    +

    font_line_skip

    +
    +
     my $font_line_skip = SDL::TTF::font_line_skip($font);
    + like( $font_line_skip,                                    '/^[-]?\d+$/',       "[font_line_skip] recommended spacing between lines of text is $font_line_skip" );
    +
    +
    + +
    +

    Face attributes

    +
    + +
    +

    font_faces

    +
    +

    my $font_faces = SDL::TTF::font_faces($font); +ok( $font_faces, "[font_faces] font has $font_faces faces" );

    + +
    +

    font_face_is_fixed_width

    +
    +

    my $font_face_is_fixed_width = SDL::TTF::font_face_is_fixed_width($font); +like( $font_face_is_fixed_width, '/^[01]$/', "[font_face_is_fixed_width] is $font_face_is_fixed_width" );

    + +
    +

    font_face_family_name

    +
    +

    my $font_face_family_name = SDL::TTF::font_face_family_name($font); +ok( $font_face_family_name, "[font_face_family_name] is $font_face_family_name" );

    + +
    +

    font_face_style_name

    +
    +

    my $font_face_style_name = SDL::TTF::font_face_style_name($font); +ok( $font_face_style_name, "[font_face_style_name] is $font_face_style_name" );

    + +
    +

    Glyphs

    +
    + +
    +

    glyph_is_provided

    +
    + +
    +

    glyph_metrics

    +
    +
     my @glyph_metrics = @{ SDL::TTF::glyph_metrics($font, 'M') };
    +is( scalar @glyph_metrics,                                5,                   "[glyph_metrics] (minx, maxx, miny, maxy, advance) = (" . join(', ', @glyph_metrics) . ")" );
    +
    +
    + +
    +

    Text metrics

    +
    + +
    +

    size_text

    +
    +
     my ($width, $height) = @{ SDL::TTF::size_text($font, 'Hallo World!') };
    +
    +
    + +
    +

    size_utf8

    +
    +
     my ($width, $height) = @{ SDL::TTF::size_utf8($font, 'Hallo World!') };
    +
    +
    + +
    +

    size_unicode

    +
    +
     my ($width, $height) = @{ SDL::TTF::size_unicode($font, 'Hallo World!') };
    +
    +
    + +
    +

    Font Rendering

    +
    + +
    +

    render_glyph_solid

    +
    + +
    +

    render_glyph_shaded

    +
    + +
    +

    render_glyph_blended

    +
    + +
    +

    render_text_solid

    +
    +

    Note: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=374062

    + +
    +

    render_text_shaded

    +
    + +
    +

    render_text_blended

    +
    + +
    +

    render_utf8_solid

    +
    + +
    +

    render_utf8_shaded

    +
    + +
    +

    render_utf8_blended

    +
    + +
    +

    render_unicode_solid

    +
    + +
    +

    render_unicode_shaded

    +
    + +
    +

    render_unicode_blended

    +
    + +
    +

    AUTHOR

    Top

    +
    +

    Tobias Leich [FROGGS]

    +
    +

    SEE ALSO

    Top

    +
    \ No newline at end of file diff --git a/pages/SDL-TTFont.html-inc b/pages/SDL-TTFont.html-inc index 62f29f6..c09dc7b 100644 --- a/pages/SDL-TTFont.html-inc +++ b/pages/SDL-TTFont.html-inc @@ -47,7 +47,7 @@

    DESCRIPTION

    Top

    -

    SDL::TTFont is a module for applying true type fonts to SDL::Surface.

    +

    SDL::TTFont is a module for applying true type fonts to SDL::Surface.

    METHODS

    Top

    @@ -176,7 +176,7 @@ for "ae" will not always match the width for "a" + "e&q

    SEE ALSO

    Top

    diff --git a/pages/SDL-Tool-Font.html-inc b/pages/SDL-Tool-Font.html-inc index 529f6fb..0934d05 100644 --- a/pages/SDL-Tool-Font.html-inc +++ b/pages/SDL-Tool-Font.html-inc @@ -21,7 +21,7 @@

    DESCRIPTION

    Top

    -

    SDL::Tool::Font provides a unified interface for applying +

    SDL::Tool::Font provides a unified interface for applying True Type and SFont fonts to various surfaces.

    @@ -42,7 +42,7 @@ with the upper left hand corner starting at the specified coordinates.

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Tool-Graphic.html-inc b/pages/SDL-Tool-Graphic.html-inc index fa3e057..8f81125 100644 --- a/pages/SDL-Tool-Graphic.html-inc +++ b/pages/SDL-Tool-Graphic.html-inc @@ -31,7 +31,7 @@

    DESCRIPTION

    Top

    -

    SDL::Tool::Graphic is a module for zooming and rotating SDL::Surface objects.

    +

    SDL::Tool::Graphic is a module for zooming and rotating SDL::Surface objects.

    METHODS

    Top

    @@ -40,17 +40,17 @@

    zoom ( surface, xzoom, yzoom, smooth )

    -

    SDL::Tool::Graphic::zoom scales a SDL::Surface along the two axis independently.

    +

    SDL::Tool::Graphic::zoom scales a SDL::Surface along the two axis independently.

    rotoZoom ( surface, angle, zoom, smooth )

    -

    SDL::Tool::Graphic::rotoZoom rotates and fixed axis zooms a SDL::Surface.

    +

    SDL::Tool::Graphic::rotoZoom rotates and fixed axis zooms a SDL::Surface.

    grayScale ( surface )

    -

    SDL::Tool::Graphic::grayScale rotates and fixed axis zooms a SDL::Surface.

    +

    SDL::Tool::Graphic::grayScale rotates and fixed axis zooms a SDL::Surface.

    invertColor ( surface )

    @@ -69,7 +69,7 @@

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/SDL-Tutorial-Animation.html-inc b/pages/SDL-Tutorial-Animation.html-inc index 2fa2c2a..a9da727 100644 --- a/pages/SDL-Tutorial-Animation.html-inc +++ b/pages/SDL-Tutorial-Animation.html-inc @@ -59,8 +59,8 @@ frame and saving and restoring the background for every object drawn.

    Since you have to draw the screen in the right order once to start with it's pretty easy to make this into a loop and redraw things in the right order for -every frame. Given a SDL::App object $app, a SDL::Rect $rect, and -a SDL::Color $color, you only have to create a new SDL::Rect $bg, +every frame. Given a SDL::App object $app, a SDL::Rect $rect, and +a SDL::Color $color, you only have to create a new SDL::Rect $bg, representing the whole of the background surface and a new SDL::Color $bg_color, representing the background color. You can write a draw_frame() function as follows:

    @@ -155,11 +155,11 @@ them soon.

    SEE ALSO

    Top

    -
    SDL::Tutorial::Drawing
    +
    SDL::Tutorial::Drawing

    basic drawing with SDL Perl

    -
    SDL::Tutorial::Images
    +
    SDL::Tutorial::Images

    animating images

    diff --git a/pages/SDL-Tutorial-Images.html-inc b/pages/SDL-Tutorial-Images.html-inc index cda90aa..c639db8 100644 --- a/pages/SDL-Tutorial-Images.html-inc +++ b/pages/SDL-Tutorial-Images.html-inc @@ -55,9 +55,9 @@ need to draw the alternate image beforehand somehow.

    Loading Images

    -

    As usual, start with an SDL::App object representing the image window. Then +

    As usual, start with an SDL::App object representing the image window. Then preload the image file. This is easy; just pass the name parameter to the -SDL::Surface constructor:

    +SDL::Surface constructor:

     

    	use SDL::Surface;
     
    @@ -100,7 +100,7 @@ though.  Assuming $app is the SDL::App object, as usual:

     

    -

    Here we have two SDL::Rect objects which represent rectangular regions of a +

    Here we have two SDL::Rect objects which represent rectangular regions of a Surface. $frame_rect represents the entire area of $frame, while $dest_rect represents the area of the main window in which to blit the frame. This may be clearer with more descriptive variable names:

    @@ -199,11 +199,11 @@ smoothly. More on that next time.

    SEE ALSO

    Top

    -
    SDL::Tutorial
    +
    SDL::Tutorial

    basic SDL tutorial

    -
    SDL::Tutorial::Animation
    +
    SDL::Tutorial::Animation

    non-image animation

    diff --git a/pages/SDL-Tutorial-Pong.html-inc b/pages/SDL-Tutorial-Pong.html-inc index eb61d93..718320d 100644 --- a/pages/SDL-Tutorial-Pong.html-inc +++ b/pages/SDL-Tutorial-Pong.html-inc @@ -60,7 +60,7 @@

     

    -

    That creates a new SDL::Game::Rect object, a rectangle, with the given width/height dimensions and in the given top/left position of the screen.

    +

    That creates a new SDL::Game::Rect object, a rectangle, with the given width/height dimensions and in the given top/left position of the screen.

    Wait. Did I say... <screen>?

    @@ -110,7 +110,7 @@

    # TODO

    Now let's query some events!

    -

    First, we need to use the SDL::Event module. Add this to the beginning of our code:

    +

    First, we need to use the SDL::Event module. Add this to the beginning of our code:

     

      use SDL::Event;
       my $event = SDL::Event->new;
    diff --git a/pages/SDL-Tutorial.html-inc b/pages/SDL-Tutorial.html-inc
    index 0f33a14..afaa46f 100644
    --- a/pages/SDL-Tutorial.html-inc
    +++ b/pages/SDL-Tutorial.html-inc
    @@ -53,7 +53,7 @@ though.  Here's how to get up and running as quickly as possible.

    Surfaces

    All graphics in SDL live on a surface. You'll need at least one. That's what -SDL::App provides.

    +SDL::App provides.

    Of course, before you can get a surface, you need to initialize your video mode. SDL gives you several options, including whether to run in a window or take over the full screen, the size of the window, the bit depth of your @@ -95,8 +95,8 @@ surface. That's a bit more complicated, but see the -name paramete

    Working With The App

    Since $app from the code above is just an SDL surface with some extra sugar, -it behaves much like SDL::Surface. In particular, the all-important blit -and update methods work. You'll need to create SDL::Rect objects +it behaves much like SDL::Surface. In particular, the all-important blit +and update methods work. You'll need to create SDL::Rect objects representing sources of graphics to draw onto the $app's surface, blit them there, then update the $app.

    Note: "blitting" is copying a chunk of memory from one place to another.

    @@ -106,15 +106,15 @@ them there, then update the $app.

    SEE ALSO

    Top

    -
    SDL::Tutorial::Drawing
    +
    SDL::Tutorial::Drawing

    basic drawing with rectangles

    -
    SDL::Tutorial::Animation
    +
    SDL::Tutorial::Animation

    basic rectangle animation

    -
    SDL::Tutorial::Images
    +
    SDL::Tutorial::Images

    image loading and animation

    diff --git a/pages/SDL-Video.html-inc b/pages/SDL-Video.html-inc index 041c083..c1c0c36 100644 --- a/pages/SDL-Video.html-inc +++ b/pages/SDL-Video.html-inc @@ -135,7 +135,7 @@
     my $surface = SDL::Video::get_video_surface();
     
     
    -

    This function returns the current display SDL::Surface. If SDL is doing format conversion on the display surface, this +

    This function returns the current display SDL::Surface. If SDL is doing format conversion on the display surface, this function returns the publicly visible surface, not the real video surface.

    Example:

     # somewhere after you set the video mode
    @@ -151,7 +151,7 @@ function returns the publicly visible surface, not the real video surface.

     my $video_info = SDL::Video::get_video_info();
     
     
    -

    This function returns a read-only SDL::VideoInfo containing information about the video hardware. If it is called before +

    This function returns a read-only SDL::VideoInfo containing information about the video hardware. If it is called before SDL::Video::set_video_mode, the vfmt member of the returned structure will contain the pixel format of the best video mode.

    Example:

    @@ -262,7 +262,7 @@ It returns 0 if the mode is not supported at all, otherwise the sug

    Sets up a video mode with the specified width, height, bits-per-pixel and flags. -set_video_mode returns a SDL::Surface on success otherwise it returns undef on error, the error message is retrieved +set_video_mode returns a SDL::Surface on success otherwise it returns undef on error, the error message is retrieved using SDL::get_error.

    @@ -349,12 +349,12 @@ each call to SDL::Video::set_video_mode, for examp
     $converted_surface = SDL::Video::convert_surface( $surface, $format, $flags );
     
     
    -

    Creates a new SDL::surface of the specified SDL::PixelFormat, and then copies and maps the given surface to it. +

    Creates a new SDL::surface of the specified SDL::PixelFormat, and then copies and maps the given surface to it. It is also useful for making a copy of a surface.

    -

    The flags parameter is passed to SDL::Surface->new and has those semantics. +

    The flags parameter is passed to SDL::Surface->new and has those semantics. This function is used internally by SDL::Video::display_format. This function can only be called after SDL::init.

    -

    it returns a SDL::Surface on success or undef on error.

    +

    it returns a SDL::Surface on success or undef on error.

    display_format

    @@ -391,8 +391,8 @@ segfault.

     $surface = SDL::Video::load_BMP( $filename );
     
     
    -

    Loads a SDL::Surface from a named Windows BMP file. -SDL::Video::load_BMP returns a SDL::Surface on success or undef on error.

    +

    Loads a SDL::Surface from a named Windows BMP file. +SDL::Video::load_BMP returns a SDL::Surface on success or undef on error.

    Note: When loading a 24-bit Windows BMP file, pixel data points are loaded as blue, green, red, and NOT red, green, blue (as one might expect).

     use SDL;
      use SDL::Video;
    @@ -429,7 +429,7 @@ segfault.

     $saved_BMP = SDL::Video::save_BMP( $surface, $filename );
     
     
    -

    Saves the given SDL::Surface as a Windows BMP file named filename. +

    Saves the given SDL::Surface as a Windows BMP file named filename. it returns 0 on success or -1 on error.

    @@ -520,7 +520,7 @@ two arbitrary RGBA surfaces this way and get the result you would expect from &q
     $fill_rect = SDL::Video::fill_rect( $dest, $dest_rect, $pixel );
     
     
    -

    This function performs a fast fill of the given SDL::Rect with the given SDL::PixelFormat. If dest_rect is NULL, the whole surface +

    This function performs a fast fill of the given SDL::Rect with the given SDL::PixelFormat. If dest_rect is NULL, the whole surface will be filled with color.

    The color should be a pixel of the format used by the surface, and can be generated by the SDL::Video::map_RGB or SDL::Video::map_RGBA|/map_RGBA functions. If the color value contains an alpha value then the destination is simply "filled" with that @@ -543,7 +543,7 @@ surface to see the result. This can happen if you are using a shadowed surface t

     int SDL::Video::lock_surface( $surface );
     
     
    -

    SDL::Video::lock_surface sets up the given SDL::Surface for directly accessing the pixels. +

    SDL::Video::lock_surface sets up the given SDL::Surface for directly accessing the pixels. Between calls to SDL::lock_surface and SDL::unlock_surface, you can write to ( surface-set_pixels>) and read from ( surface-get_pixels> ), using the pixel format stored in surface-format>. Once you are done accessing the surface, you should use SDL::Video::unlock_surface to release the lock.

    @@ -660,7 +660,7 @@ Surfaces should be unlocked as soon as possible.
     SDL::Video::set_clip_rect( $surface, $rect );
     
     
    -

    Sets the clipping rectangle for the given SDL::Surface. When this surface is the destination of a blit, only the area within the clip +

    Sets the clipping rectangle for the given SDL::Surface. When this surface is the destination of a blit, only the area within the clip rectangle will be drawn into. The rectangle pointed to by rect will be clipped to the edges of the surface so that the clip rectangle for a surface can never fall outside the edges of the surface. @@ -673,7 +673,7 @@ If rect is NULL the clipping rectangle will be set to the full size of the surfa

     SDL::Video::get_clip_rect( $surface, $rect );
     
     
    -

    Gets the clipping rectangle for the given SDL::Surface. When this surface is the destination of a blit, only the area within the clip +

    Gets the clipping rectangle for the given SDL::Surface. When this surface is the destination of a blit, only the area within the clip rectangle is drawn into. The rectangle pointed to by rect will be filled with the clipping rectangle of the surface. SDL::Video::get_clip_rect doesn't returns anything;

    @@ -705,7 +705,7 @@ The rectangle pointed to by rect will be filled with the clipping rectangle of t
     SDL::Video::blit_surface( $src_surface, $src_rect, $dest_surface, $dest_rect );
     
     
    -

    This performs a fast blit from the given source SDL::Surface to the given destination SDL::Surface. +

    This performs a fast blit from the given source SDL::Surface to the given destination SDL::Surface. The width and height in src_surface determine the size of the copied rectangle. Only the position is used in the dst_rect (the width and height are ignored). Blits with negative dst_rect coordinates will be clipped properly. If src_rect is NULL, the entire surface is copied. If dst_rect is NULL, then the destination position (upper left corner) is (0, 0). @@ -833,7 +833,7 @@ instead.

    When surface is the surface associated with the current display, the display colormap will be updated with the requested colors. If SDL_HWPALETTE was set in SDL::Video::set_video_mode flags, SDL::Video::set_colors will always return 1, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation. -The color components of a SDL::Color structure are 8-bits in size, giving you a total of 2563 = 16777216 colors. +The color components of a SDL::Color structure are 8-bits in size, giving you a total of 2563 = 16777216 colors. Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display). SDL::Video::set_colors modifies both palettes (if present), and is equivalent to calling SDL::Video::set_palette with the @@ -1007,11 +1007,11 @@ with SDL::Video::set_gamma.

     $pixel = SDL::Video::map_RGB( $pixel_format, $r, $g, $b );
     
     
    -

    Maps the RGB color value to the specified SDL::PixelFormat and returns the pixel value as a 32-bit int. +

    Maps the RGB color value to the specified SDL::PixelFormat and returns the pixel value as a 32-bit int. If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned. If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque).

    SDL::Video::map_RGB returns a pixel value best approximating the given RGB color value for a given pixel format. -If the SDL::PixelFormat's bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored +If the SDL::PixelFormat's bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

     use SDL;
      use SDL::Video;
    @@ -1049,7 +1049,7 @@ If the SDL::PixelFormat's  bpp (color depth) is le
     
     $pixel = SDL::Video::map_RGB( $pixel_format, $r, $g, $b, $a );
     
     
    -

    Maps the RGBA color value to the specified SDL::PixelFormat and returns the pixel value as a 32-bit int. +

    Maps the RGBA color value to the specified SDL::PixelFormat and returns the pixel value as a 32-bit int. If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned. If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).

    A pixel value best approximating the given RGBA color value for a given pixel format. @@ -1186,7 +1186,7 @@ or disabled using the SDL_GL_DOUBLEBUFFER attribute.

    Video Overlay Functions

    Top

    lock_YUV_overlay

    @@ -1212,7 +1212,7 @@ can be displayed. unlock_YUV_overlay does not return anything.

     $display_overlay = SDL::Video::display_YUV_overlay( $overlay, $dstrect );
     
     
    -

    Blit the overlay to the display surface specified when the overlay was created. The SDL::Rect structure, dstrect, specifies a rectangle +

    Blit the overlay to the display surface specified when the overlay was created. The SDL::Rect structure, dstrect, specifies a rectangle on the display where the overlay is drawn. The x and y fields of dstrect specify the upper left location in display coordinates. The overlay is scaled (independently in x and y dimensions) to the size specified by dstrect, and is optimized for 2x scaling

    It returns 0 on success or -1 on error.

    @@ -1282,7 +1282,7 @@ bar or desktop when the window is minimized). As with title this string may be f

    Sets the icon for the display window. Win32 icons must be 32x32.

    -

    This function must be called before the first call to SDL::Video::set_video_mode. Note that this means SDL::Image +

    This function must be called before the first call to SDL::Video::set_video_mode. Note that this means SDL::Image cannot be used.

    The shape is determined by the colorkey or alpha channel of the icon, if any. If neither of those are present, the icon is made opaque (no transparency).

    @@ -1326,7 +1326,7 @@ and not interpreted by a window manager, if any.

    If the application is running in a window managed environment SDL attempts to iconify/minimise it. If wm_iconify_window is successful, -the application will receive a SDL_APPACTIVE loss event (see Application visibility events at SDL::Event).

    +the application will receive a SDL_APPACTIVE loss event (see Application visibility events at SDL::Event).

    Returns non-zero on success or 0 if iconification is not supported or was refused by the window manager.

    Example:

     use SDL;
    @@ -1368,9 +1368,9 @@ is experimental).

    Category Objects

    \ No newline at end of file diff --git a/pages/SDL-VideoInfo.html-inc b/pages/SDL-VideoInfo.html-inc index dd4981f..c8ba508 100644 --- a/pages/SDL-VideoInfo.html-inc +++ b/pages/SDL-VideoInfo.html-inc @@ -168,7 +168,7 @@

    SEE ALSO

    Top

    \ No newline at end of file diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index d777799..afe8efe 100644 --- a/pages/documentation.html-inc +++ b/pages/documentation.html-inc @@ -1,2 +1,2 @@
    -

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    thumbSDL::Time- a SDL perl extension for managing timers.
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure.
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDL::App- a SDL perl extension

    GFX
    thumbSDL::GFX::Framerate- framerate calculating functions
    thumbSDL::GFX::Primitives- basic drawing functions
    Structure
    thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Mixer
    thumbSDL::Mixer- Sound and music functions
    thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
    thumbSDL::Mixer::Effects- sound effect functions
    thumbSDL::Mixer::Groups- Audio channel group functions
    thumbSDL::Mixer::Music- functions for music
    thumbSDL::Mixer::Samples- functions for loading sound samples
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic
    TODO
    Core
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    GFX
    thumbSDL::GFX::BlitFunc- blitting functions
    thumbSDL::GFX::ImageFilter- image filtering functions
    thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::Images
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
    thumbSDL::Tutorial::Pong- Get started pong
    thumbSDL::Tutorial::Tetris- Let's Make Tetris

    UNCATEGORIZED
    thumbSDL::Font- a SDL perl extension
    thumbSDL::Game::Palette- a perl extension
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::Music- a perl extension
    thumbSDL::OpenGL- a perl extension
    thumbSDL::SFont- a perl extension
    thumbSDL::SMPEG- a SDL perl extension
    thumbSDL::Sound- a perl extension
    thumbSDL::TTF
    thumbSDL::TTFont- a SDL perl extension
    thumbSDL::Tool::Font- a perl extension
    thumbSDL::Tool::Graphic
    +

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    thumbSDL::Time- a SDL perl extension for managing timers.
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure.
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDL::App- a SDL perl extension

    GFX
    thumbSDL::GFX::Framerate- framerate calculating functions
    thumbSDL::GFX::Primitives- basic drawing functions
    Structure
    thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Mixer
    thumbSDL::Mixer- Sound and music functions
    thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
    thumbSDL::Mixer::Effects- sound effect functions
    thumbSDL::Mixer::Groups- Audio channel group functions
    thumbSDL::Mixer::Music- functions for music
    thumbSDL::Mixer::Samples- functions for loading sound samples
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic
    TODO
    Core
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    GFX
    thumbSDL::GFX::BlitFunc- blitting functions
    thumbSDL::GFX::ImageFilter- image filtering functions
    thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces
    TTF
    thumbSDL::TTF- True Type Font functions (libfreetype)

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::Images
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
    thumbSDL::Tutorial::Pong- Get started pong
    thumbSDL::Tutorial::Tetris- Let's Make Tetris

    UNCATEGORIZED
    thumbSDL::Font- a SDL perl extension
    thumbSDL::Game::Palette- a perl extension
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::Music- a perl extension
    thumbSDL::OpenGL- a perl extension
    thumbSDL::SFont- a perl extension
    thumbSDL::SMPEG- a SDL perl extension
    thumbSDL::Sound- a perl extension
    thumbSDL::TTFont- a SDL perl extension
    thumbSDL::Tool::Font- a perl extension
    thumbSDL::Tool::Graphic
    diff --git a/tools/PM-Pod2html-snippet.pl b/tools/PM-Pod2html-snippet.pl index c1a67f4..d45d28d 100644 --- a/tools/PM-Pod2html-snippet.pl +++ b/tools/PM-Pod2html-snippet.pl @@ -184,8 +184,9 @@ sub node if($page =~ /^SDL\b/) { - $page =~ s/::([A-Z])+/-$1/g; + $page =~ s/::([A-Z]+)/-$1/g; $page =~ s/(.*)::(.*)/\/$1.html#$2/; + $page .= '.html' unless $page =~ /\.html/; return $page; }