Hi,
I need to draw a circle (Later other things) on a transparent surface.
I'm attaching the code snippet (Take from DirectFB sample apps).
How can i make the surface transparent.
For testing, I had set "bg-tile=/etc/sq.png" in directfbrc to load image
as background.
Is this okay?
/*------------------------------------------------------------------------------*/
int main (int argc, char **argv)
{
int i;
DFBSurfaceDescription dsc;
DFBCHECK (DirectFBInit (&argc, &argv));
printf("\n************* Start *************\n");
DFBCHECK (DirectFBCreate (&dfb));
#if 1
//DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN));
dsc.flags = DSDESC_CAPS;
dsc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING;
DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary ));
DFBCHECK (dfb->CreateSurface( dfb, &recordicon_desc, &logo ));
DFBCHECK (primary->GetSize (primary, &screen_width, &screen_height));
DFBCHECK (primary->SetColor (primary, 0xff, 0xff, 0xff, 0x00));
DFBCHECK (primary->FillRectangle (primary, 0, 0, screen_width,
screen_height));
DFBCHECK (primary->Blit (primary, logo, NULL, 320, (screen_height -
dsc.height) / 2));
DFBCHECK (primary->Flip (primary, NULL, DSFLIP_WAITFORSYNC));
sleep(3);
logo->Release (logo);
primary->Release (primary);
dfb->Release (dfb);
#endif
printf("\n************* End *************\n");
return 23;
}
/*------------------------------------------------------------------------------*/
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users