[SDL] Need a string-blitting function
Jeroen Clarysse
jeroen.clarysse at telenet.be
Tue Nov 13 06:11:19 PST 2007
i've been working on this today, so here is my 5 cents :
you'll need the SDL_ttf library
after that, its a matter of these lines :
TTF_Font *font = TTF_OpenFont(fontname, fontsize);
my_text_surface = TTF_RenderText_Solid(font, "testing", m_fore_color);
here, fontname is a char * pointer to your fontname which is best
locally stored with your application (so make sure you use royalty
free fonts !!)
On 13 Nov 2007, at 15:02, Michael Sullivan wrote:
> I need a function that I can pass a string and and x and y coordinates
> to that will blit said string to the screen. Can anyone point me in
> the
> right direction? Something like Graphics.drawstring in Java...
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
More information about the SDL
mailing list