paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[3]: [paragui-users] pictures cross-fade with zoom


From: taurus
Subject: Re[3]: [paragui-users] pictures cross-fade with zoom
Date: Mon, 11 Nov 2002 10:35:38 +0000

Hello,

     I`ve found the problem... it`s wierd. The function
     PG_Draw::BlitScaled doesnt support alpha (transparency)!
     AAaaaaaaa! I`ve lost several days believing that it`s perfect :)

     So I need to blit zoomed surface to another temp surface *then*
     SDL_BlitSurface() with alpha. Or, to rewrite
     PG_Draw::BlitScaled... Well I will check what will be faster in
     terms of game speed :)

Friday, November 08, 2002, 20:05:06, you wrote:

TP>> On Fri, 8 Nov 2002, taurus wrote:

>>> PS. I`ve posted 2 questions about zooming and transparent fading, but
>>> didn`t receive any answer... I have problems to cross-fade 2 pictures,
>>> maybe anybody has any thoughts - I will appreciate any help!

TP>> cross-fade?  there's lots of ways.  Note that rendering SDL_Surface*
TP>> on a widget is fairly easy....  ummm.

t> Hm, I`ve faced one strange problem when blitting with alpha...
t> In cycle I fade from black to normal 1st picture, then I start to fade
t> from transparent to opaque the 2nd one...
t> What I`ve got is: after 1st is ready, the widget is cleaned (filled
t> with black) :( and when the 2nd starts, it goes from transparent on
t> black instead of overlapping with the 1st!
t> What I`m doing wrong?

t> My algorithm:

t> create temp srf
t> cycle
t> {
t>       set alpha for pic1
t>       blit pic1 to srf

t>       blit srf to screen
t> }

t> cycle
t> {
t>       set alpha for pic2
t>       blit pic2 to srf

t>       blit srf to screen
t> }


t> Mess in alpha settings??

TP>> Also zooming's possible using the scaling blit functions provided.

t> Yep, I know that, but if I need to zoom only a rect from the surface
t> (like magnify effect)? I`ve solved it by creating a small temp surface
t> and zoomblitting in on the dest surface. In sum, there are 4
t> creating/destroying temp surface sequences (blit, zoomblit, blit,
t> blit), and it makes one frame for 100 ms on P4/1.5GHz for 800x600x30...
t> The only way to optimize it - zoom rect of a surface directly to a
t> surface, as I understand there is no function even in SDL_gfx.
t> So, I`m going to implement it.




t> Kind regards,
t>        taurus                          

t> address@hidden

t>  ->> "If you will have a megaphone, you will never have to be alone..."






Kind regards,
       taurus                          

address@hidden

 ->> "If you will have a megaphone, you will never have to be alone..."






reply via email to

[Prev in Thread] Current Thread [Next in Thread]