[SDL] How to draw text in some determined area, doing auto wrap
Gustavo Sverzut Barbieri
gsbarbieri at yahoo.com.br
Thu Sep 5 11:09:01 PDT 2002
I'm working in a project called FreeVO(http://freevo.sf.net), that
uses SDL with python to do the graphics.
We want to build a widget that will act like a frame: we say its
width/height, the text and font(ttf) to use. Then it should be able to
arrange the text into the specified area, breaking lines if it doesn't
fit (preferable in white spaces) and if the hole text overflows the
area capacity, should appear "..." after the last part visible.
I don't know any technique to do that, but they must exit (any
toolkit do that). I want to know what is the best way to do that.
PS: We use python+SDL and pygame. So solutions using them are
O super editor para criação de sites: é grátis, fácil e rápido.
More information about the SDL