develooper Front page | perl.sdl.devel | Postings from December 2011

AW: SDLx::Text - replace old text?

Thread Previous
From:
Alex
Date:
December 25, 2011 03:56
Subject:
AW: SDLx::Text - replace old text?
Message ID:
000d01ccc2fc$35b34530$a119cf90$@gmx.de
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.dumont@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/


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About