Tao.Sdl SDK Documentation

SdlTtf.TTF_RenderUTF8_Solid Method 

Draw UTF8 text in solid mode.

[Visual Basic]
Public Shared Function TTF_RenderUTF8_Solid( _
   ByVal font As IntPtr, _
   ByVal text As String, _
   ByVal fg As SDL_Color _
) As IntPtr
[C#]
public static IntPtr TTF_RenderUTF8_Solid(
   IntPtr font,
   string text,
   SDL_Color fg
);

Parameters

font
Font to render the text with. A NULL pointer is not checked.
text
The UTF8 null terminated string to render.
fg
The color to render the text in. This becomes colormap index 1.

Return Value

a pointer to a new SDL_Surface. NULL is returned on errors.

Remarks

This function renders text using a TTF_Font. This mode of rendering is:

Solid

Quick and Dirty

Create an 8-bit palettized surface and render the given text at fast quality with the given font and color. The 0 pixel value is the colorkey, giving a transparent background, and the 1 pixel value is set to the text color. The colormap is set to have the desired foreground color at index 1, this allows you to change the color without having to render the text again. Colormap index 0 is of course not drawn, since it is the colorkey, and thus transparent, though it's actual color is 255 minus each RGB component of the foreground. This is the fastest rendering speed of all the rendering modes. This results in no box around the text, but the text is not as smooth. The resulting surface should blit faster than the Blended one. Use this mode for FPS and other fast changing updating text displays.

Binds to C-function in SDL_ttf.h

            SDL_Surface * TTF_RenderUTF8_Solid(TTF_Font *font,const char *text, SDL_Color fg)
            

See Also

SdlTtf Class | Tao.Sdl Namespace | TTF_SizeText | TTF_RenderText_Solid | TTF_RenderUNICODE_Solid | TTF_RenderGlyph_Solid | TTF_RenderText_Shaded | TTF_RenderText_Blended