Tao.Sdl SDK Documentation

SdlTtf.TTF_RenderUNICODE_Solid Method 

Draw UNICODE text in solid mode.

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

Parameters

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

Return Value

This function returns the new surface, or NULL if there was an error.

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 * SDLCALL TTF_RenderUNICODE_Solid(TTF_Font *font, const Uint16 *text, SDL_Color fg)
            

See Also

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