Hi,
I am looking for simple code example that displays a background image and a transparent layer with text. This PDF explains the behavior of layers http://directfb.org/docs/ELC2008/elc2008_directfb_gfx.pdf , but there is no example code.

I tried this piece code, but no success:

-----------------------------------
 DirectFB/Genefx: Could not lock source!
    --> Object is suspended!
/home/testcase/svn/ProjectX/control/src/BootScreen.cpp <190> err 6:
(#) DirectFBError [primary_layer->CreateWindow (primary_layer, &win_desc, &primary_window)]: Not implemented!
----------------------------------


DFBCHECK(DirectFBInit(0, NULL));
DFBCHECK(DirectFBCreate(&d->dfb));
DFBCHECK (d->dfb->SetCooperativeLevel (d->dfb, DFSCL_FULLSCREEN));
d->dsc.flags = DSDESC_CAPS;
d->dsc.caps = static_cast<DFBSurfaceCapabilities>(DSCAPS_PRIMARY | DSCAPS_DOUBLE);

DFBCHECK (d->dfb->CreateSurface( d->dfb, &d->dsc, &d->primary ));
DFBCHECK (d->primary->GetSize (d->primary, &d->screen_width, &d->screen_height));


IDirectFBDisplayLayer *primary_layer;
IDirectFBWindow *primary_window;
IDFBWindowDescription win_desc;

DFBCHECK(d->dfb->GetDisplayLayer (d->dfb, DLID_PRIMARY, &primary_layer)); DFBCHECK( primary_layer->CreateWindow (primary_layer, &win_desc, &primary_window));
     DFBCHECK(primary_window->SetOpacity(primary_window,128));


 DFBCHECK(primary_window->GetSurface(primary_window,&d->primary2 ));
DFBCHECK (d->primary->GetSize (d->primary2, &d->screen_width, &d->screen_height));
     initFont(d->fontSize, 128, 128 ,128);


greets
Dennis

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to