No more smolder
[sdlgit/SDL-Site.git] / pages / SDL-TTF.html-inc
index 6fca4a9..29189a2 100644 (file)
@@ -698,8 +698,10 @@ your display-surface.</p>
 
  SDL::init(SDL_INIT_VIDEO);
 
+ SDL::TTF::init();
+
  my $display = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE);
- my $font    = SDL::TTF::open_font('arial.ttf', '24);
+ my $font    = SDL::TTF::open_font('arial.ttf', '24');
  my $white   = SDL::Color-&gt;new(0xFF, 0xFF, 0xFF);
  my $black   = SDL::Color-&gt;new(0x00, 0x00, 0x00);
  my $surface = SDL::TTF::render_text_solid($font, 'Hallo!', $white, $black);
@@ -759,8 +761,10 @@ your display-surface.</p>
 
  SDL::init(SDL_INIT_VIDEO);
 
+ SDL::TTF::init();
+
  my $display = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE);
- my $font    = SDL::TTF::open_font('arial.ttf', '24);
+ my $font    = SDL::TTF::open_font('arial.ttf', '24');
  my $surface = SDL::TTF::render_text_blended($font, 'Hallo!', SDL::Color-&gt;new(0xFF,0xFF,0xFF));
 
  SDL::Video::blit_surface($surface, SDL::Rect-&gt;new(0, 0, 640, 480), $display, SDL::Rect-&gt;new(10, 10, 640, 480));