From: Tobias Leich Date: Sun, 21 Mar 2010 21:58:38 +0000 (+0100) Subject: added docs for pango X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c785ed89faeaf10319eebaf57875ac973262c0f4;p=sdlgit%2FSDL-Site.git added docs for pango --- diff --git a/pages/SDL-Pango-Context.html-inc b/pages/SDL-Pango-Context.html-inc new file mode 100644 index 0000000..8b5867c --- /dev/null +++ b/pages/SDL-Pango-Context.html-inc @@ -0,0 +1,48 @@ +
+ +

Index

+ +
+ + +

NAME

Top

+
+

SDL::Pango::Context - Context object for SDL::Pango

+ +
+

CATEGORY

Top

+
+

TODO, Pango, Structure

+ +
+

METHODS

Top

+
+ +
+

new

+
+
 my $context = new SDL::Pango::Context;
+
+
+ +
+

AUTHOR

Top

+
+

Tobias Leich [FROGGS]

+ +
+

SEE ALSO

Top

+ +
\ No newline at end of file diff --git a/pages/SDL-Pango.html-inc b/pages/SDL-Pango.html-inc new file mode 100644 index 0000000..b99b95d --- /dev/null +++ b/pages/SDL-Pango.html-inc @@ -0,0 +1,223 @@ +
+ +

Index

+ +
+ + +

NAME

Top

+
+

SDL::Pango - Text rendering engine

+ +
+

CATEGORY

Top

+
+

TODO, Pango

+ +
+

SYNOPSIS

Top

+
+
 use SDL;
+ use SDL::Color;
+ use SDL::Surface;
+ use SDL::Overlay;
+ use SDL::Rect;
+ use SDL::Video;
+ use SDL::PixelFormat;
+ use SDL::Pango;
+ use SDL::Pango::Context;
+
+ SDL::Pango::init();
+
+ my $context = new SDL::Pango::Context;
+ SDL::Pango::set_default_color($context, 0xA7C344FF, 0);
+ SDL::Pango::set_markup($context, 'Hallo <b>W<span foreground="red">o</span><i>r</i><u>l</u>d</b>!', -1);
+
+ SDL::init(SDL_INIT_VIDEO);
+
+ my $display = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE);
+ my $bg      = SDL::Video::map_RGB($display->format, 0x12, 0x22, 0x45);
+ SDL::Video::fill_rect($display, SDL::Rect->new(0, 0, 640, 480), $bg);
+
+ my $surface = SDL::Pango::create_surface_draw($context);
+ SDL::Video::blit_surface($surface, SDL::Rect->new(0, 0, 640, 480), $display, SDL::Rect->new(0, 0, 640, 480));
+
+ SDL::Video::update_rect($display, 0, 0, 0, 0);
+ SDL::delay(2000);
+
+
+ +
+

CONSTANTS

Top

+
+

The constants are not exported by default. You can export them into your namespace by doing:

+
 use SDL::Pango ':constants';
+
+
+

or access them directly:

+
 SDL::Pango::SDLPANGO_DIRECTION_NEUTRAL;
+
+
+

Available constants:

+
+
SDLPANGO_DIRECTION_LTR
+
+

Left to right

+
+
SDLPANGO_DIRECTION_RTL
+
+

Right to left

+
+
SDLPANGO_DIRECTION_WEAK_LTR
+
+

Left to right (weak)

+
+
SDLPANGO_DIRECTION_WEAK_RTL
+
+

Right to left (weak)

+
+
SDLPANGO_DIRECTION_NEUTRAL
+
+

Neutral

+
+
+ +
+

METHODS

Top

+
+ +
+

init

+
+
 SDL::Pango::init();
+
+
+ +
+

was_init

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

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

set_minimum_size

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

set_text

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

set_markup

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

get_layout_width

+
+
 my $w = SDL::Pango::get_layout_width($context);
+
+
+ +
+

get_layout_height

+
+
 my $h = SDL::Pango::get_layout_height($context);
+
+
+ +
+

set_base_direction

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

set_dpi

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

set_language

+
+
 SDL::Pango::set_language($context, "en");
+
+
+ +
+

draw

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

set_surface_create_args

+
+
 SDL::Pango::set_surface_create_args($context, SDL_SWSURFACE, 32, 255<<24, 255<<16, 255<<8, 255);
+
+
+ +
+

create_surface_draw

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

AUTHOR

Top

+
+

Tobias Leich [FROGGS]

+ +
+

SEE ALSO

Top

+ +
\ No newline at end of file diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index ed0b440..ac7390a 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

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