src/video/font.cpp File Reference

#include <config.h>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <stdexcept>
#include <SDL_image.h>
#include <physfs.h>
#include "lisp/list_iterator.hpp"
#include "lisp/parser.hpp"
#include "physfs/physfs_sdl.hpp"
#include "supertux/screen.hpp"
#include "util/file_system.hpp"
#include "util/log.hpp"
#include "util/utf8_iterator.hpp"
#include "video/drawing_context.hpp"
#include "video/font.hpp"
#include "video/renderer.hpp"

Go to the source code of this file.

Functions

bool vline_empty (SDL_Surface *surface, int x, int start_y, int end_y, Uint8 threshold)


Function Documentation

bool @506::vline_empty ( SDL_Surface surface,
int  x,
int  start_y,
int  end_y,
Uint8  threshold 
) [static]

Definition at line 40 of file font.cpp.

Referenced by Font::loadFontSurface().

00041 {
00042   Uint8* pixels = (Uint8*)surface->pixels;
00043 
00044   for(int y = start_y; y < end_y; ++y)
00045   {
00046     const Uint8& p = pixels[surface->pitch*y + x*surface->format->BytesPerPixel + 3];
00047     if (p > threshold)
00048     {
00049       return false;
00050     }
00051   }
00052   return true;
00053 }


Generated on Mon Jun 9 03:38:27 2014 for SuperTux by  doxygen 1.5.1