From: Kartik Thakore
@@ -34,11 +35,14 @@ The image as a new SDL::Surface. NULL is returne
@@ -194,6 +198,10 @@ Note: If the image format supports a transparent pixel, 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
use SDL; use SDL::RWOps; use SDL::Image; @@ -206,9 +214,9 @@ Note: If the image format supports a transparent pixel, RETURNS -The image as a new SDL::Surface. NULL is returned on errors. -++Return
++The image as a new SDL::Surface. NULL is returned on errors.
is_[TYPE]
@@ -230,6 +238,15 @@ The image as a new SDL::Surface. NULL is returneis_XV These functions take a SDL::RWOps as a parameter.
+ +Return
+++1 if the image is a valid [TYPE] and the [TYPE] format support is compiled into SDL_image. 0 is returned otherwise.
+ +Example
+-use SDL::RWOps; use SDL::Image; @@ -237,17 +254,9 @@ The image as a new SDL::Surface. NULL is returne print "Image is BMP" if ( SDL::is_BMP ); - - -RETURN
--1 if the image is a valid [TYPE] and the [TYPE] format support is compiled into SDL_image. 0 is returned otherwise.
- -load_[TYPE]_rw
-Specific loader for known formats:
@@ -269,13 +278,13 @@ The image as a new SDL::Surface. NULL is returneThese functions take a SDL::RWop as a parameter
RETURN
-+Return
+-The image as a new SDL::Surface. NULL is returned on errors, like if the [TYPE] is not supported, or a read error.
Example
-+Example
+-use SDL; use SDL::RWOps; use SDL::Image; @@ -297,13 +306,13 @@ The image as a new SDL::Surface. NULL is returneThis functions takes the reference of an array in the valid @XPM format. Also the $width of the XPM image.
RETURNS
-+Return
+-The image as a new SDL::Surface. NULL is returned on errors, like if XPM is not supported, or a read error.
EXAMPLE
-+Example
+-my @XPM= ( '30 30 9 1', ' c #FFFFFF', @@ -383,13 +392,13 @@ Note: No initialization is needed nor performed when using the SDL::Image::is_JP Note: this function does not always set the error string, so do not depend on SDL::Image::get_error being meaningful all the time.Return
-+Return
+-A bitmask of all the currently inited image loaders.
Example
-+Example
+use SDL::Image; my $flags = IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_JPG; my $inited = SDL::Image::init($flags); @@ -401,6 +410,10 @@ Note: this function does not always set the error string, so do not depend on SD+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.
+ +Example
+use SDL::Image; SDL::Image::init(IMG_INIT_JPG); #loads JPG support SDL::Image::load("file.png"); #loads PNG support diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index 910cf55..47afff2 100644 --- a/pages/documentation.html-inc +++ b/pages/documentation.html-inc @@ -1,2 +1,2 @@-Documentation (latest development branch)
Core SDL - Simple DirectMedia Layer for Perl
Audio SDL::Audio - SDL Bindings for Audio
Structure SDL::AudioCVT - Audio Conversion Structure SDL::AudioSpec - SDL Bindings for structure SDL::AudioSpec
CDROM SDL::CDROM - SDL Bindings for the CDROM device
Structure SDL::CD - SDL Bindings for structure SDL_CD SDL::CDTrack - SDL Bindings for structure SDL_CDTrack
Events SDL::Events - Bindings to the Events Category in SDL API
Structure SDL::Event - General event structure
Joystick SDL::Joystick - SDL Bindings for the Joystick device
Structure SDL::Mixer::MixChunk - SDL Bindings for structure SDL_MixChunk SDL::Mixer::MixMusic - SDL Bindings for structure SDL_MixMusic
Mouse SDL::Mouse - SDL Bindings for the Mouse device
Structure SDL::Cursor - Mouse cursor structure
Structure SDL::Version - SDL Bindings for structure SDL_Version
Video SDL::Video - Bindings to the video category in SDL API
Structure SDL::Color - Format independent color description SDL::Overlay - YUV Video overlay SDL::Palette - Color palette for 8-bit pixel formats SDL::PixelFormat - Stores surface format information SDL::Rect - Defines a rectangular area SDL::Surface - Graphic surface structure. SDL::VideoInfo - Video Target Information
Cookbook SDL::Cookbook SDL::Cookbook::PDL
Extension SDL::App - a SDL perl extension
Mixer SDL::Mixer - a SDL perl extension
SDL
Image SDL::Image - Bindings for the SDL_Image library
TODO
Core
MultiThread SDL::MultiThread - Bindings to the MultiThread category in SDL API
Structure SDL::RWOps - SDL Bindings to SDL_RWOPs
Tutorials SDL::Tutorial - introduction to Perl SDL SDL::Tutorial::Animation SDL::Tutorial::Images SDL::Tutorial::LunarLander - a small tutorial on Perl SDL SDL::Tutorial::Pong - Get started pong SDL::Tutorial::Tetris - Let's Make Tetris +
UNCATEGORIZED SDL::Font - a SDL perl extension SDL::Game::Palette - a perl extension SDL::MPEG - a SDL perl extension SDL::Music - a perl extension SDL::OpenGL - a perl extension SDL::SFont - a perl extension SDL::SMPEG - a SDL perl extension SDL::Sound - a perl extension SDL::TTFont - a SDL perl extension SDL::Timer - a SDL perl extension for managing timers. SDL::Tool::Font - a perl extension SDL::Tool::Graphic Documentation (latest development branch)
Core SDL - Simple DirectMedia Layer for Perl
Audio SDL::Audio - SDL Bindings for Audio
Structure SDL::AudioCVT - Audio Conversion Structure SDL::AudioSpec - SDL Bindings for structure SDL::AudioSpec
CDROM SDL::CDROM - SDL Bindings for the CDROM device
Structure SDL::CD - SDL Bindings for structure SDL_CD SDL::CDTrack - SDL Bindings for structure SDL_CDTrack
Events SDL::Events - Bindings to the Events Category in SDL API
Structure SDL::Event - General event structure
Joystick SDL::Joystick - SDL Bindings for the Joystick device
Structure SDL::Mixer::MixChunk - SDL Bindings for structure SDL_MixChunk SDL::Mixer::MixMusic - SDL Bindings for structure SDL_MixMusic
Mouse SDL::Mouse - SDL Bindings for the Mouse device
Structure SDL::Cursor - Mouse cursor structure
Structure SDL::Version - SDL Bindings for structure SDL_Version
Video SDL::Video - Bindings to the video category in SDL API
Structure SDL::Color - Format independent color description SDL::Overlay - YUV Video overlay SDL::Palette - Color palette for 8-bit pixel formats SDL::PixelFormat - Stores surface format information SDL::Rect - Defines a rectangular area SDL::Surface - Graphic surface structure. SDL::VideoInfo - Video Target Information
Cookbook SDL::Cookbook SDL::Cookbook::PDL
Extension SDL::App - a SDL perl extension
Mixer SDL::Mixer - a SDL perl extension
SDL
Image SDL::Image - Bindings for the SDL_Image library
TODO
Core
MultiThread SDL::MultiThread - Bindings to the MultiThread category in SDL API
Structure SDL::RWOps - SDL Bindings to SDL_RWOPs
Tutorials SDL::Tutorial - introduction to Perl SDL SDL::Tutorial::Animation SDL::Tutorial::Images SDL::Tutorial::LunarLander - a small tutorial on Perl SDL SDL::Tutorial::Pong - Get started pong SDL::Tutorial::Tetris - Let's Make Tetris
UNCATEGORIZED SDL::Font - a SDL perl extension SDL::Game::Palette - a perl extension SDL::MPEG - a SDL perl extension SDL::Music - a perl extension SDL::OpenGL - a perl extension SDL::SFont - a perl extension SDL::SMPEG - a SDL perl extension SDL::Sound - a perl extension SDL::TTFont - a SDL perl extension SDL::Timer - a SDL perl extension for managing timers. SDL::Tool::Font - a perl extension SDL::Tool::Graphic