So, when I have an application, that uses a background image (which is the
origincal background for my question), the appropriate way to redraw a
text would be:
- calculate the surface of a text one wants to draw
- store this specific piece of the old surface somewhere
- draw the text
now, when redrawing the text:
- blit the old surface over the text surface
- repeat the above 3 steps for the new text
Or is it done in another way? I'm not that familiar with SDL programming,
maybe I'm just doing it wrong.
Best regards joyeux noel,
Alex
-Ursprüngliche Nachricht-
Von: Dominique Dumont [mailto:domi.dum...@free.fr]
Gesendet: Sonntag, 25. Dezember 2011 10:24
An: sdl-devel@perl.org
Betreff: Re: SDLx::Text - replace old text?
Le Friday 23 December 2011 21:02:17, Kartik Thakore a écrit :
Regarding the surface, SDLx::App is a SDLx::Surface. That's what I
was referring to. I don't think it's safe to make any assumptions
about what's behind the text, so it should be the module user's
responsibility to clear whatever is behind it.
Hmm can we just not make the blit for clearing the text surface? Cause
it wraps an sdl::surface.
Don't go that way: next thing user will ask is to restore what was behind
the text on the surface.
Dominique
--
http://config-model.wiki.sourceforge.net/ -o-
http://search.cpan.org/~ddumont/
http://www.ohloh.net/accounts/ddumont -o- http://ddumont.wordpress.com/