コード例 #1
0
ファイル: SDL_ttf.c プロジェクト: ashmew2/kolibriosSVN
static void Flush_Cache(TTF_Font *font)
{
	int i;

	for ( i=0; i<(sizeof font->cache)/(sizeof font->cache[0]); ++i ) {
		if ( font->cache[i].cached ) {
			Flush_Glyph(&font->cache[i]);
		}
	}
	if ( font->scratch.cached ) {
		Flush_Glyph(&font->scratch);
	}
}
コード例 #2
0
ファイル: SDL_ttf_lite.cpp プロジェクト: crust/sscroll
static void Flush_Cache( TTF_Font* font )
{
	int i;
	int size = sizeof( font->cache ) / sizeof( font->cache[0] );

	for( i = 0; i < size; ++i ) {
		if( font->cache[i].cached ) {
			Flush_Glyph( &font->cache[i] );
		}

	}
}
コード例 #3
0
ファイル: SDL_ttf.c プロジェクト: ashmew2/kolibriosSVN
static TT_Error Find_Glyph(TTF_Font *font, Uint16 ch)
{
	int retval;

	retval = 0;
	if ( ch < 256 ) {
		font->current = &font->cache[ch];
	} else {
		if ( font->scratch.cached != ch ) {
			Flush_Glyph(&font->scratch);
		}
		font->current = &font->scratch;
	}
	if ( ! font->current->cached ) {
		retval = Load_Glyph(font, ch, font->current);
	}
	return retval;
}