File Coverage

blib/lib/SDLx/SFont.pm
Criterion Covered Total %
statement 20 21 95.2
branch n/a
condition n/a
subroutine 7 8 87.5
pod 0 2 0.0
total 27 31 87.1


line stmt bran cond sub pod time code
1             package SDLx::SFont;
2 2     2   1902 use strict;
  2         6  
  2         74  
3 2     2   11 use warnings;
  2         5  
  2         51  
4 2     2   440 use SDL::Image;
  2         4  
  2         124  
5 2     2   13 use vars qw(@ISA @EXPORT @EXPORT_OK);
  2         4  
  2         171  
6             require Exporter;
7             require DynaLoader;
8 2     2   12 use SDL::Constants ':SDL::TTF';
  2         5  
  2         438  
9             our @ISA = qw(Exporter DynaLoader SDL::Surface);
10              
11 2     2   16 use base 'Exporter';
  2         4  
  2         485  
12             our @EXPORT = ('SDL_TEXTWIDTH');
13              
14             sub SDL_TEXTWIDTH {
15 0     0 0 0 return SDLx::SFont::TextWidth( join( '', @_ ) );
16             }
17              
18             sub print_text { #print is a horrible name for this
19 2     2 0 6738 my ( $surf, $x, $y, @text ) = @_;
20 2         1142 SDLx::SFont::print_string( $surf, $x, $y, join( '', @text ) );
21             }
22              
23             bootstrap SDLx::SFont;
24              
25             1;
26