chickadee » sdl2-ttf » render-glyph-shaded

render-glyph-shaded font glyph fg bgprocedure
render-glyph-shaded* font glyph fg bgprocedure

Render the given glyph using "shaded" rendering mode. See TTF_RenderGlyph_Shaded.

  • font must be a ttf:font specifying the font to render with.
  • glyph must be an integer (representing a 16-bit Unicode character) or a Scheme character in the ASCII range. Results may be incorrect if given a Scheme character outside the ASCII range.
  • fg must be a sdl2:color specifying the foreground color, i.e. the color of the glyph itself.
  • bg must be a sdl2:color specifying the background color.

Returns a sdl2:surface containing the rendered glyph. Signals an exception of kind (exn sdl2) if an error occurred.

  • render-glyph-shaded returns a managed sdl2:surface.
  • render-glyph-shaded* returns an unmanaged sdl2:surface, which must be freed with free-surface! (from the sdl2 egg) when you are done with it.