Hi !
I'd like to implement a fade out effect on the entire screen. My
application is pretty simple, and is made of only one surface, called
primary (the basic code is taken from the simple.c example). Here are
the parameters I use to create the surface :
dsc.flags = DSDESC_CAPS;
dsc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING;
dsc.pixelformat = DSPF_ARGB;
To implement the fade out effect, I thought of doing this :
void fadeout() {
int k = 0;
while(k++ <= 255) {
primary->SetColor (primary, 0xff, 0xff, 0xff, 0x01);
primary->FillRectangle (primary, 0, 0, screen_width,
screen_height);
primary->Flip(primary, NULL, DSFLIP_NONE);
sleep(0.1);
}
}
This should apply 255 times a very light and almost transparent white
layer on the surface, and thus should be a fading to white effect.
However, it looks like no matter what the value of the alpha component
is, the layer is totally opaque (except for alpha = 0x00, in which
case it looks like the layer is solid black). What am I doing wrong ?
And is there already an implementation of such an effect ?
Thanks.
--
Jérémy
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users