File: SFont.pm

package info (click to toggle)
libsdl-perl 2.548-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,972 kB
  • sloc: perl: 13,985; ansic: 583; makefile: 35
file content (28 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package SDLx::SFont;
use strict;
use warnings;
use SDL::Image;
use vars qw(@ISA @EXPORT @EXPORT_OK);
require Exporter;
require DynaLoader;
use SDL::Constants ':SDL::TTF';
our @ISA = qw(Exporter DynaLoader SDL::Surface);

use base 'Exporter';
our @EXPORT = ('SDL_TEXTWIDTH');

our $VERSION = 2.548;

sub SDL_TEXTWIDTH {
	return SDLx::SFont::TextWidth( join( '', @_ ) );
}

sub print_text { #print is a horrible name for this
	my ( $surf, $x, $y, @text ) = @_;
	SDLx::SFont::print_string( $surf, $x, $y, join( '', @text ) );
}

bootstrap SDLx::SFont;

1;