Tao.Sdl SDK Documentation

SdlTtf.TTF_RenderGlyph_Solid Method 

Draw a UNICODE glyph in solid mode.

[Visual Basic]
Public Shared Function TTF_RenderGlyph_Solid( _
   ByVal font As IntPtr, _
   ByVal ch As Short, _
   ByVal fg As SDL_Color _
) As IntPtr
[C#]
public static IntPtr TTF_RenderGlyph_Solid(
   IntPtr font,
   short ch,
   SDL_Color fg
);

Parameters

font
Font to render glyph with. A NULL pointer is not checked.
ch
The glyph 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 glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction. 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_RenderGlyph_Solid(TTF_Font *font, Uint16 ch, SDL_Color fg)
            

See Also

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