chickadee » sdl2-ttf » render-unicode-shaded*

render-unicode-shaded font unicode fg bgprocedure
render-unicode-shaded* font unicode fg bgprocedure

Render the given 16-bit Unicode encoded text using "shaded" rendering mode. See TTF_RenderUNICODE_Shaded.

  • font must be a ttf:font specifying the font to render with.
  • unicode must be a pointer or locative to a null-terminated C array of 16-bit unsigned integers, representing Unicode text. (SRFI-4 u16vectors can be wrapped in a locative using make-locative.)
  • fg must be a sdl2:color specifying the foreground color, i.e. the color of the text itself.
  • bg must be a sdl2:color specifying the background color.

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

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