From: Tobias Leich Date: Sun, 21 Mar 2010 22:43:38 +0000 (+0100) Subject: docs for pango done X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e29ec770efeb303dd7b883f3cbab313af24d985;p=sdlgit%2FSDL-Site.git docs for pango done --- diff --git a/pages/SDL-Pango-Context.html-inc b/pages/SDL-Pango-Context.html-inc index 8b5867c..a03fd0b 100644 --- a/pages/SDL-Pango-Context.html-inc +++ b/pages/SDL-Pango-Context.html-inc @@ -21,7 +21,7 @@

CATEGORY

Top

-

TODO, Pango, Structure

+

Pango, Structure

METHODS

Top

@@ -33,6 +33,7 @@
 my $context = new SDL::Pango::Context;
 
 
+

Creates a new SDL::Pango context object. See SDL::Pango.

AUTHOR

Top

diff --git a/pages/SDL-Pango.html-inc b/pages/SDL-Pango.html-inc index b99b95d..8ccf451 100644 --- a/pages/SDL-Pango.html-inc +++ b/pages/SDL-Pango.html-inc @@ -36,7 +36,7 @@

CATEGORY

Top

-

TODO, Pango

+

Pango

SYNOPSIS

Top

@@ -116,6 +116,9 @@
 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. +SDL does not have to be initialized before this call.

+

Returns: always 0.

was_init

@@ -123,35 +126,45 @@
 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 +in a row.

+

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

set_default_color

-
 SDL::Pango::set_default_color($context, 0xA7C344FF, 0);
- SDL::Pango::set_default_color($context, 0xA7, 0xC3, 0x44, 0xFF, 0, 0, 0, 0x00);
+
 SDL::Pango::set_default_color($context, $foreground, $background);
+ SDL::Pango::set_default_color($context, $r1, $g1, $b1, $a1, $r2, $g2, $b2, $a2);
 
 
+

Sets default foreground and background color when rendering text and markup.

+

You can call it with either 2 color-parameters (32-bit RRGGBBAA values), or with 4 separate values for foreground and 4 separate values for +background.

set_minimum_size

-
 SDL::Pango::set_minimum_size($context, 640, 0);
+
 SDL::Pango::set_minimum_size($context, $width, $height);
 
 
+

Sets the minimum size of the drawing rectangle.

set_text

-
 SDL::Pango::set_text($context, $text, 20);
+
 SDL::Pango::set_text($context, $text, $length);
 
 
+

Set plain text to context. Text must be utf-8. $length chars will be rendered, pass -1 to render the whole text.

set_markup

-
 SDL::Pango::set_markup($context, $text, -1);
+
 SDL::Pango::set_markup($context, $text, $length);
 
 
+

Set markup text to context. Text must be utf-8. $length chars will be rendered, pass -1 to render the whole text.

+

See PangoMarkupFormat for a description about the markup format.

get_layout_width

@@ -159,6 +172,7 @@
 my $w = SDL::Pango::get_layout_width($context);
 
 
+

Returns the width of the resulting surface of the given text/markup for this context.

get_layout_height

@@ -166,24 +180,34 @@
 my $h = SDL::Pango::get_layout_height($context);
 
 
+

Returns the height of the resulting surface of the given text/markup for this context.

set_base_direction

-
 SDL::Pango::set_base_direction($context, SDLPANGO_DIRECTION_LTR);
+
 SDL::Pango::set_base_direction($context, $direction);
 
 
+

Sets the direction of the text to either left-to-right or right-to-left.

+

See CONSTANTS.

set_dpi

-
 SDL::Pango::set_dpi($context, 48, 48);
+
 SDL::Pango::set_dpi($context, $dpi_x, $dpi_y);
 
 
+

Sets the DPI (dots per inch) for this context. Default is 96.

set_language

+
 SDL::Pango::set_language($context, $language);
+
+
+

Sets the language name for this context.

+

See ISO639-2.

+

Example:

 SDL::Pango::set_language($context, "en");
 
 
@@ -191,14 +215,28 @@

draw

-
 SDL::Pango::draw($context, $display, (640 - $w) / 2, (480 - $h) / 2);
+
 SDL::Pango::draw($context, $display, $x, $y);
 
 
+

Draws the text or markup to an existing surface at position $x/$y.

set_surface_create_args

-
 SDL::Pango::set_surface_create_args($context, SDL_SWSURFACE, 32, 255<<24, 255<<16, 255<<8, 255);
+
 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.

+

Example:

+
 SDL::Pango::set_surface_create_args(
+     $context, 
+     SDL_SWSURFACE, 
+     32, 
+     0xFF000000, 
+     0x00FF0000, 
+     0x0000FF00, 
+     0x000000FF
+ );
 
 
@@ -208,6 +246,7 @@
 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.

AUTHOR

Top

diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index ac7390a..0566435 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
Pango
thumbSDL::Pango- Text rendering engine
Structure
thumbSDL::Pango::Context- Context object for SDL::Pango

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

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

Pango
thumbSDL::Pango- Text rendering engine
Structure
thumbSDL::Pango::Context- Context object for SDL::Pango
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)
Structure
thumbSDL::TTF::Font- Font object type for SDL_ttf

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