From: Tobias Leich Date: Sat, 9 Oct 2010 10:37:54 +0000 (+0200) Subject: update for SDL::Event X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0b221bb4fce84647a6cb9d7343de7330fb561c71;p=sdlgit%2FSDL-Site.git update for SDL::Event --- diff --git a/pages/SDL-Event.html-inc b/pages/SDL-Event.html-inc index 2d6140d..de04a03 100644 --- a/pages/SDL-Event.html-inc +++ b/pages/SDL-Event.html-inc @@ -263,7 +263,7 @@ and when a key is pressed (type=SDL_KEYDOWN or key_state=SDL_ then an SDL_RELEASED when released and pressed again. For these keys KEYUP and KEYDOWN events are therefore analogous to the state of the caps lock and num lock LEDs rather than the keys themselves. These special cases are required for compatibility with Sun workstations.

-

Note: Repeating SDL_KEYDOWN events will occur if key repeat is enabled (see enable_key_repeat ("enable_key_repeat" in SDL::EVENTS)).

+

Note: Repeating SDL_KEYDOWN events will occur if key repeat is enabled (see enable_key_repeat).

key_state

@@ -303,7 +303,7 @@ This field is very useful when you are checking for certain key presses, like so

key_unicode

-

The unicode field is only used when UNICODE translation is enabled with enable_unicode ("enable_unicode" in SDL::EVENTS). +

The unicode field is only used when UNICODE translation is enabled with enable_unicode. If unicode is non-zero then this is the UNICODE character corresponding to the keypress. If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character:

 my $char;
@@ -332,7 +332,7 @@ button states (motion_state).

motion_state

-

The button state can be interpreted using the SDL_BUTTON macro (see get_mouse_state ("get_mouse_state" in SDL::EVENTS)).

+

The button state can be interpreted using the SDL_BUTTON macro (see get_mouse_state).

motion_x, motion_y

@@ -554,7 +554,7 @@ screen updates will still report success even though the application will no lon

AUTHORS

Top

-

See AUTHORS in SDL.

+

See /SDL.html#AUTHORS.

SEE ALSO

Top

diff --git a/pages/SDL-Events.html-inc b/pages/SDL-Events.html-inc index dcfc02a..a943e9e 100644 --- a/pages/SDL-Events.html-inc +++ b/pages/SDL-Events.html-inc @@ -309,7 +309,7 @@ However, if you are not polling or waiting for events (e.g. you are filtering th

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.

-

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.

+

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.

RETURN

@@ -335,7 +335,7 @@ The event is copied into the queue, and the caller may dispose of the memory poi

Waits indefinitely for the next available $event, returning 0 if there was an error while waiting for events, 1 otherwise.

If $event is not NULL, the next event is removed from the queue and stored in $event.

-

As this function implicitly calls SDL_PumpEvents, you can only call this function in the thread that SDL::Video::set_video_mode.

+

As this function implicitly calls SDL_PumpEvents, you can only call this function in the thread that SDL::Video::set_video_mode.

RETURN

@@ -361,7 +361,7 @@ The event is copied into the queue, and the caller may dispose of the memory poi

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

One Caveat is if you are filtering SDL_QUIT the event will be filtered if it is non-intterupt call ( Window closes normally ). If it is a interrupt SDL_QUIT 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.

+

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.

@@ -373,7 +373,7 @@ The event is copied into the queue, and the caller may dispose of the memory poi print $keys_ref->[SDLK_RETURN]; # 1 if pressed , 0 if not pressed -

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

+

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.

@@ -437,12 +437,12 @@ The event is copied into the queue, and the caller may dispose of the memory poi

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.

+

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. +

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

@@ -495,7 +495,7 @@ The event is copied into the queue, and the caller may dispose of the memory poi $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.

+

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).

diff --git a/pages/SDL-GFX-Primitives.html-inc b/pages/SDL-GFX-Primitives.html-inc index 85f3ed1..3bb557f 100644 --- a/pages/SDL-GFX-Primitives.html-inc +++ b/pages/SDL-GFX-Primitives.html-inc @@ -55,7 +55,7 @@

DESCRIPTION

Top

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 SDLx::App.

+obtained by SDL::Video::set_video_mode or can be an SDLx::App.

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

diff --git a/pages/SDL-Image.html-inc b/pages/SDL-Image.html-inc index 6190dcd..b49b366 100644 --- a/pages/SDL-Image.html-inc +++ b/pages/SDL-Image.html-inc @@ -148,10 +148,10 @@ 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. -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. +

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: -SDL::Video::set_color_key

+SDL::Video::set_color_key

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

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

@@ -202,9 +202,9 @@ Note: If the image format supports a transparent pixel,

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 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: -SDL::Video::set_color_key

+SDL::Video::set_color_key

Transparency

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

quit

For version SDL_image 1.2.10 and up

-

This function cleans up all dynamically loaded library handles, freeing memory. If support is required again it will be initialized again, either by SDL::Image::init or loading an image with dynamic support required. You may call this function when SDL::Image::load functions are no longer needed for the JPG, PNG, and TIF image formats. You only need to call this function once, no matter how many times SDL::Image::init was called.

+

This function cleans up all dynamically loaded library handles, freeing memory. If support is required again it will be initialized again, either by SDL::Image::init or loading an image with dynamic support required. You may call this function when SDL::Image::load functions are no longer needed for the JPG, PNG, and TIF image formats. You only need to call this function once, no matter how many times SDL::Image::init was called.

Example

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

set_error

-

Same as SDL::set_error

+

Same as SDL::set_error

get_error

-

Same as SDL::get_error

+

Same as SDL::get_error

SEE ALSO

Top

diff --git a/pages/SDL-Mixer-Effects.html-inc b/pages/SDL-Mixer-Effects.html-inc index ba2e9c2..6a530e6 100644 --- a/pages/SDL-Mixer-Effects.html-inc +++ b/pages/SDL-Mixer-Effects.html-inc @@ -109,7 +109,7 @@ space. When a processor is finished being used, any function passed into $

Remove the registered effect function from the effect list for channel. If the channel is active the registered effect will have its $done_callback function called, if it was specified in -SDL::Mixer::Effects::register.

+SDL::Mixer::Effects::register.

Returns: Zero on errors, such as invalid channel, or effect function not registered on channel.

Note: Do not use this on a threaded perl. This will crash.

@@ -120,7 +120,7 @@ If the channel is active the registered effect will have its $done_callbac

This removes all effects registered to $channel. If the channel is active all the registered effects will have their $done_callback -functions called, if they were specified in SDL::Mixer::Effects::register.

+functions called, if they were specified in SDL::Mixer::Effects::register.

Returns: Zero on errors, such as channel not existing.

Note: Do not use this on a threaded perl. This will crash.

@@ -132,8 +132,8 @@ functions called, if they were specified in SDL::Mixer::Effects::register with MIX_CHANNEL_POST to use multiple postmix processors. -This postmix processor is run AFTER all the registered postmixers set up by SDL::Mixer::Effects::register.

+There can only be one postmix function used at a time through this method. Use SDL::Mixer::Effects::register with MIX_CHANNEL_POST to use multiple postmix processors. +This postmix processor is run AFTER all the registered postmixers set up by SDL::Mixer::Effects::register.

Note: Do not use this on a threaded perl. This will crash.

@@ -144,7 +144,7 @@ This postmix processor is run AFTER all the registered postmixers set up by

This effect simulates a simple attenuation of volume due to distance. The volume never quite reaches silence, even at max distance (255).

NOTE: Using a distance of 0 will cause the effect to unregister itself from channel. You cannot unregister it any other way, unless you use -SDL::Mixer::Effects::unregister_all on the channel.

+SDL::Mixer::Effects::unregister_all on the channel.

Returns: Zero on errors, such as an invalid channel, or if Mix_RegisterEffect failed.

@@ -153,11 +153,11 @@ This postmix processor is run AFTER all the registered postmixers set up by SDL::Mixer::Effects::set_panning( $channel, $left, $right ); -

This effect will only work on stereo audio. Meaning you called SDL::Mixer::open_audio with 2 channels.

+

This effect will only work on stereo audio. Meaning you called SDL::Mixer::open_audio with 2 channels.

Note: Setting both left and right to 255 will unregister the effect from channel. You cannot unregister it any other way, unless you use -SDL::Mixer::Effects::unregister_all on the channel.

+SDL::Mixer::Effects::unregister_all on the channel.

Note: Using this function on a mono audio device will not register the effect, nor will it return an error status.

-

Returns: Zero on errors, such as bad channel, or if SDL::Mixer::Effects::register failed.

+

Returns: Zero on errors, such as bad channel, or if SDL::Mixer::Effects::register failed.

set_position

@@ -178,7 +178,7 @@ angle and distance from the camera's point of view, the effect pans and attenuat

So you can see it goes clockwise starting at directly in front.

$distance is 0(close/loud) to 255(far/quiet).

Note: Using angle and distance of 0, will cause the effect to unregister itself from channel. You cannot unregister it any other way, -unless you use SDL::Mixer::Effects::unregister_all on the channel.

+unless you use SDL::Mixer::Effects::unregister_all on the channel.

Returns: Zero on errors, such as an invalid channel, or if SDL::Mixer::Effects::register failed.

@@ -189,7 +189,7 @@ unless you use SDL::Mixer::Effe

If you pass 1 to $flip it simple reverse stereo, swaps left and right channel sound.

Note: Using a flip of 0, will cause the effect to unregister itself from channel. You cannot unregister it any other way, unless you use -SDL::Mixer::Effects::register on the channel.

+SDL::Mixer::Effects::register on the channel.

AUTHORS

Top

diff --git a/pages/SDL-Mixer-Groups.html-inc b/pages/SDL-Mixer-Groups.html-inc index f35aaf9..d2ceadc 100644 --- a/pages/SDL-Mixer-Groups.html-inc +++ b/pages/SDL-Mixer-Groups.html-inc @@ -46,14 +46,14 @@ The channels are reserved starting from channel 0 to $num-1

The following functions are affected by this setting:

Returns: The number of channels reserved. Never fails, but may return less channels than you ask for, depending on the number of channels -previously allocated (see SDL::Mixer::Channels::allocate_channels).

+previously allocated (see SDL::Mixer::Channels::allocate_channels).

group_channel

diff --git a/pages/SDL-Mixer-Music.html-inc b/pages/SDL-Mixer-Music.html-inc index 02cab2a..0b6c7c4 100644 --- a/pages/SDL-Mixer-Music.html-inc +++ b/pages/SDL-Mixer-Music.html-inc @@ -91,9 +91,9 @@ Using a custom music player and the internal music player is not possible, the c
 SDL::Mixer::Music::hook_music_finished( 'main::callback' );
 
 
-

This callback is called when music called by e.g. SDL::Mixer::Music::play_music or SDL::Mixer::Music::fade_in_music stops naturally. +

This callback is called when music called by e.g. SDL::Mixer::Music::play_music or SDL::Mixer::Music::fade_in_music stops naturally. This happens when the music is over or is fading out.

-

Note: If you play music via SDL::Mixer::Music::hook_music, this callback will never be called.

+

Note: If you play music via SDL::Mixer::Music::hook_music, this callback will never be called.

Example:

 my $music_is_playing = 0;
  my @music            = qw(first.mp3 next.mp3 other.mp3 last.mp3);
@@ -122,7 +122,7 @@ This happens when the music is over or is fading out.

 my $position = SDL::Mixer::Music::get_music_hook_data();
 
 
-

Returns the position (first) parameter that will be passed to SDL::Mixer::Music::hook_music's callback.

+

Returns the position (first) parameter that will be passed to SDL::Mixer::Music::hook_music's callback.

play_music

@@ -148,7 +148,7 @@ Passing -1 to $loops will loop the music infinitely.

 my $music = SDL::Mixer::Music::fade_in_music( $mix_music, $loops, $ms );
 
 
-

Same as SDL::Mixer::Music::play_music but you can specify the fade-in time by $ms.

+

Same as SDL::Mixer::Music::play_music but you can specify the fade-in time by $ms.

fade_out_music

@@ -242,7 +242,7 @@ Passing zero is similar to rewinding the song.

MP3

Jumps to position seconds from the current position in the stream. -So you may want to call SDL::Mixer::Music::rewind_music before this. +So you may want to call SDL::Mixer::Music::rewind_music before this. Does not go in reverse... negative values do nothing.

diff --git a/pages/SDL-Mixer-Samples.html-inc b/pages/SDL-Mixer-Samples.html-inc index 673288a..e71a452 100644 --- a/pages/SDL-Mixer-Samples.html-inc +++ b/pages/SDL-Mixer-Samples.html-inc @@ -54,7 +54,7 @@
 my $mix_chunk = SDL::Mixer::Samples::load_WAV( $file );
 
 
-

load_WAV reads a file and passes it to SDL::Mixer::Samples::load_WAV_RW. SO this is a quick way to load a file into a chunk.

+

load_WAV reads a file and passes it to SDL::Mixer::Samples::load_WAV_RW. SO this is a quick way to load a file into a chunk.

Example:

 my $chunk = SDL::Mixer::Samples::load_WAV('sample.wav');
 
diff --git a/pages/SDL-Mixer.html-inc b/pages/SDL-Mixer.html-inc
index 43e150a..064cb66 100644
--- a/pages/SDL-Mixer.html-inc
+++ b/pages/SDL-Mixer.html-inc
@@ -177,7 +177,7 @@ error code when they fail. The result will be a horrible staticy noise. You can
 of SDL should take this parameter only as a hint, then read back the value that the OS (for example, OSS or ALSA) has chosen to use in case the 
 desired audio type is not supported. 

Note: When already initialized, this function will not re-initialize SDL_mixer, nor fail. It will merely increment the number of times -SDL::Mixer::close_audio must be called to actually get it to uninitialize. This serves as a very simplistic method for multiple application +SDL::Mixer::close_audio must be called to actually get it to uninitialize. This serves as a very simplistic method for multiple application components to use SDL_mixer without necessitating a great deal of inter-component awareness. Be warned however that in such a situation, the latest components to initialize SDL_mixer will probably not get the SDL_mixer settings they're expecting.

Example:

diff --git a/pages/SDL-Overlay.html-inc b/pages/SDL-Overlay.html-inc index 4d4f2f5..67d749f 100644 --- a/pages/SDL-Overlay.html-inc +++ b/pages/SDL-Overlay.html-inc @@ -122,7 +122,7 @@ SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 */

As of release 2.3 direct right to overlay is disable.

An array of pointers to the data of each plane. The overlay should be locked before these pointers are used.

-

see SDL::Video::lock_YUV_overlay, SDL::Video::unload_YUV_overlay

+

see SDL::Video::lock_YUV_overlay, SDL::Video::unload_YUV_overlay

hw_overlay

diff --git a/pages/SDL-Pango.html-inc b/pages/SDL-Pango.html-inc index 0aaf1be..142cdd6 100644 --- a/pages/SDL-Pango.html-inc +++ b/pages/SDL-Pango.html-inc @@ -132,7 +132,7 @@
 SDL::Pango::init();
 
 
-

Initialize the Glib and Pango API. This must be called before using other functions in this library, excepting SDL::Pango::was_init. +

Initialize the Glib and Pango API. This must be called before using other functions in this library, excepting SDL::Pango::was_init. SDL does not have to be initialized before this call.

Returns: always 0.

@@ -142,7 +142,7 @@ SDL does not have to be initialized before this call.

 my $was_init = SDL::Pango::was_init();
 
 
-

Query the initilization status of the Glib and Pango API. You may, of course, use this before SDL::Pango::init to avoid initilizing twice +

Query the initilization status of the Glib and Pango API. You may, of course, use this before SDL::Pango::init to avoid initilizing twice in a row.

Returns: Non-zero when already initialized. Zero when not initialized.

@@ -250,7 +250,7 @@ background.

 SDL::Pango::set_surface_create_args($context, $flags, $bits, $r_mask, $g_mask, $b_mask, $a_mask);
 
 
-

Sets the argumet that are used when creating a surface via SDL::Pango::create_surface_draw.

+

Sets the argumet that are used when creating a surface via SDL::Pango::create_surface_draw.

Example:

 SDL::Pango::set_surface_create_args(
      $context, 
@@ -270,7 +270,7 @@ background.

 my $surface = SDL::Pango::create_surface_draw($context);
 
 
-

Creates a new surface and draws the text/markup. You can specify the attributes of the surfaces using SDL::Pango::set_surface_create_args.

+

Creates a new surface and draws the text/markup. You can specify the attributes of the surfaces using SDL::Pango::set_surface_create_args.

AUTHORS

Top

diff --git a/pages/SDL-TTF.html-inc b/pages/SDL-TTF.html-inc index 2602f6d..392a65b 100644 --- a/pages/SDL-TTF.html-inc +++ b/pages/SDL-TTF.html-inc @@ -178,7 +178,7 @@ No prior initialization needs to be done before these function is called.

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. +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.

@@ -189,8 +189,8 @@ SDL does not have to be initialized before this call.

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.

+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

@@ -199,7 +199,7 @@ You may, of course, use this before SDL::TTF::init<

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 +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

@@ -228,7 +228,7 @@ use the functionality again

 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 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.

@@ -237,7 +237,7 @@ This can load TTF and FON files.

 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 +

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);
@@ -250,7 +250,7 @@ will be freed by SDL_ttf library. Don't do this, perl will free this object for
 
 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 +

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.

@@ -405,7 +405,7 @@ overlapping glyphs or abnormal spacing within words.

Get the maximum pixel height of all glyphs of the loaded font. You may use this height for rendering text as close together vertically as possible, though adding at least one pixel height to it will space it so they can't touch. Remember that SDL_ttf doesn't handle multiline -printing, so you are responsible for line spacing, see the SDL::TTF::font_line_skip as well.

+printing, so you are responsible for line spacing, see the SDL::TTF::font_line_skip as well.

font_ascent

@@ -447,7 +447,7 @@ of the rectangle used when blitting the glyph on the screen.

 my $font_line_skip = SDL::TTF::font_line_skip($font);
 
 
-

Get the recommended pixel height of a rendered line of text of the loaded font. This is usually larger than the SDL::TTF::font_height of the +

Get the recommended pixel height of a rendered line of text of the loaded font. This is usually larger than the SDL::TTF::font_height of the font.

@@ -545,7 +545,7 @@ in the font is the same width, thus you can assume that a rendered string's widt

Calculate the resulting surface size of the LATIN1 encoded text rendered using $font. No actual rendering is done, however correct kerning -is done to get the actual width. The height returned is the same as you can get using SDL::TTF::font_height.

+is done to get the actual width. The height returned is the same as you can get using SDL::TTF::font_height.

size_utf8

@@ -554,7 +554,7 @@ is done to get the actual width. The height returned is the same as you can get

Calculate the resulting surface size of the UTF8 encoded text rendered using $font. No actual rendering is done, however correct kerning is -done to get the actual width. The height returned in h is the same as you can get using SDL::TTF::font_height.

+done to get the actual width. The height returned in h is the same as you can get using SDL::TTF::font_height.

Note that the first example uses the same text as in the LATIN1 example, that is because plain ASCII is UTF8 compatible.

Examples:

 ($width, $height) = @{ SDL::TTF::size_utf8($font, 'Hallo World!') }; # plain text, if your script is in utf8 or ansi-format
@@ -578,7 +578,7 @@ done to get the actual width. The height returned in h is the same as you can ge
 
 

Calculate the resulting surface size of the UNICODE encoded text rendered using $font. No actual rendering is done, however correct kerning -is done to get the actual width. The height returned in h is the same as you can get using SDL::TTF::font_height.

+is done to get the actual width. The height returned in h is the same as you can get using SDL::TTF::font_height.

$text has to be:

UTF16BE without BOM
@@ -611,7 +611,7 @@ is done to get the actual width. The height returned in h is the same as you can

Render the unicode encoded char onto a new surface, using the Solid mode. After that you can blit this surface to your display-surface.

-

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

+

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

Note: See space-character bug. You have to upgrade libfreetype2 to at least version 2.3.5

@@ -660,7 +660,7 @@ version 2.3.5

Render the unicode encoded text onto a new surface, using the Solid mode. After that you can blit this surface to your display-surface.

-

Note: The unicode test has to be passed exactly like for SDL::TTF::size_unicode.

+

Note: The unicode test has to be passed exactly like for SDL::TTF::size_unicode.

Note: See space-character bug. You have to upgrade libfreetype2 to at least version 2.3.5

@@ -676,7 +676,7 @@ version 2.3.5

Render the unicode encoded char onto a new surface. The surface is filled with $background_color. After that you can blit this surface to your display-surface.

-

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

+

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

render_text_shaded

@@ -727,7 +727,7 @@ your display-surface.

Render the unicode encoded text onto a new surface. The surface is filled with $background_color. After that you can blit this surface to your display-surface.

-

Note: The unicode text has to be passed exactly like for SDL::TTF::size_unicode.

+

Note: The unicode text has to be passed exactly like for SDL::TTF::size_unicode.

Blended

@@ -740,7 +740,7 @@ your display-surface.

Render the unicode encoded char onto a new surface. After that you can blit this surface to your display-surface.

-

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

+

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

render_text_blended

@@ -786,7 +786,7 @@ your display-surface.

Render the unicode encoded text onto a new surface. After that you can blit this surface to your display-surface.

-

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

+

Note: The unicode char has to be passed exactly like for SDL::TTF::size_unicode.

AUTHORS

Top

diff --git a/pages/SDL-Tutorial-Animation.html-inc b/pages/SDL-Tutorial-Animation.html-inc index 2f15476..df5b3fb 100644 --- a/pages/SDL-Tutorial-Animation.html-inc +++ b/pages/SDL-Tutorial-Animation.html-inc @@ -63,7 +63,7 @@ every frame. Given a SDLx::A a SDL::Color $color, you only have to create a new SDL::Rect $bg, representing the whole of the background surface and a new mapped color $bg_color, representing the background color. The colors need to be mapped -to the format of the current display. This is done by SDL::Video::map_RGB.

+to the format of the current display. This is done by SDL::Video::map_RGB.

 

my $color = SDL::Video::map_RGB ( $app->format, diff --git a/pages/SDLx-Sprite.html-inc b/pages/SDLx-Sprite.html-inc index 17b1f46..8c7bee8 100644 --- a/pages/SDLx-Sprite.html-inc +++ b/pages/SDLx-Sprite.html-inc @@ -196,7 +196,7 @@ library has support for GFX (see SDL::Video::get_video_mode prior to this.

+

MUST CALL SDL::Video::get_video_mode prior to this.

Uses the provided SDL::Color object (or an array reference with red, green and blue values) as the color to be turned into transparent (see 'alpha' below).

diff --git a/pages/SDLx-Surface.html-inc b/pages/SDLx-Surface.html-inc index 34e51ec..2c71ab2 100644 --- a/pages/SDLx-Surface.html-inc +++ b/pages/SDLx-Surface.html-inc @@ -99,7 +99,7 @@

display

-

If SDLx::App::new or SDL::Video::get_video_mode called before then:

+

If SDLx::App::new or SDL::Video::get_video_mode called before then:

 my $appx = SDLx::Surface::display(); 
 
 
@@ -188,7 +188,7 @@ This is useful when the surface you have isn't an SDLx::Surface, bu

flip

-

Applies SDL::Video::flip to the Surface, with error checking.

+

Applies SDL::Video::flip to the Surface, with error checking.

Returns $self

@@ -200,7 +200,7 @@ This is useful when the surface you have isn't an SDLx::Surface, bu $sdlx_surface->update( [ SDL::Rect->new(0,0,1,2) ... ]); # defined rects are updated -

Applies SDL::Video::update_rect for no rect or 1 array ref. Applies SDL::Video::update_rects for array of SDL::Rects.

+

Applies SDL::Video::update_rect for no rect or 1 array ref. Applies SDL::Video::update_rects for array of SDL::Rects.

Returns $self

diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index 61c31b3..c6b9937 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::Credits- Authors and contributors of the SDL Perl project
thumbSDL::Deprecated- Log of Deprecated items per release
thumbSDL::Time- An 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::OpenGL- Using SDL with OpenGL
thumbSDL::Cookbook::PDL

Extension
thumbSDLx::App- a SDL perl extension
thumbSDLx::Layer- Storage object for surface and position information
thumbSDLx::LayerManager- Extension for managing layers in a 2D world
thumbSDLx::Rect- SDL extension for storing and manipulating rectangular coordinates
thumbSDLx::SFont- Extension making fonts out of images and printing them
thumbSDLx::Sound
thumbSDLx::Sprite- interact with images quick and easily in SDL
thumbSDLx::Sprite::Animated- create animated SDL sprites easily!
thumbSDLx::Surface- Graphic surface matrix extension
Controller
thumbSDLx::Controller- Handles the loops for events, movement and rendering
thumbSDLx::Controller::Interface- Interface Physics and Rendering with the Controller with callbacks

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

Pango
thumbSDL::Pango- Text rendering engine
Structure
thumbSDL::Pango::Context- Context object for SDL::Pango

TODO
thumbSDL::MPEG- a SDL perl extension
thumbSDL::SMPEG- a SDL perl extension
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)
Structure
thumbSDL::TTF::Font- Font object type for SDL_ttf

Tutorials
thumbSDL::Tutorial- introduction to Perl SDL
thumbSDL::Tutorial::Animation
thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
+

Documentation (latest development branch)

Core
Events
Structure
thumbSDL::Event- General event structure