PageRenderTime 26ms CodeModel.GetById 12ms app.highlight 9ms RepoModel.GetById 2ms app.codeStats 0ms

/lib/SDLx/SFont.pm

http://github.com/PerlGameDev/SDL
Perl | 28 lines | 21 code | 7 blank | 0 comment | 0 complexity | e78be94b775378404ff7b03390ea6d8a MD5 | raw file
 1package SDLx::SFont;
 2use strict;
 3use warnings;
 4use SDL::Image;
 5use vars qw(@ISA @EXPORT @EXPORT_OK);
 6require Exporter;
 7require DynaLoader;
 8use SDL::Constants ':SDL::TTF';
 9our @ISA = qw(Exporter DynaLoader SDL::Surface);
10
11use base 'Exporter';
12our @EXPORT = ('SDL_TEXTWIDTH');
13
14our $VERSION = 2.548;
15
16sub SDL_TEXTWIDTH {
17	return SDLx::SFont::TextWidth( join( '', @_ ) );
18}
19
20sub print_text { #print is a horrible name for this
21	my ( $surf, $x, $y, @text ) = @_;
22	SDLx::SFont::print_string( $surf, $x, $y, join( '', @text ) );
23}
24
25bootstrap SDLx::SFont;
26
271;
28