Tao.Sdl SDK Documentation

SdlTtf.TTF_RenderGlyph_Shaded Method 

Draw a UNICODE glyph in shaded mode.

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

Parameters

font
Font to render the text 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.
bg
The background color to render in.

Return Value

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

Remarks

Shaded

Slow and Nice, but with a Solid Box

Create an 8-bit palettized surface and render the given text at high quality with the given font and colors. The 0 pixel value is background, while other pixels have varying degrees of the foreground color from the background color. This results in a box of the background color around the text in the foreground color. The text is antialiased. This will render slower than Solid, but in about the same time as Blended mode. The resulting surface should blit as fast as Solid, once it is made. Use this when you need nice text, and can live with a box...

Binds to C-function in SDL_ttf.h

            SDL_Surface * TTF_RenderGlyph_Shaded(TTF_Font *font, Uint16 ch, SDL_Color fg, SDL_Color bg)
            

See Also

SdlTtf Class | Tao.Sdl Namespace | TTF_SizeText | TTF_RenderText_Solid | TTF_RenderText_Shaded | TTF_RenderUTF8_Shaded | TTF_RenderUNICODE_Shaded | TTF_RenderText_Blended