本文整理汇总了C++中IDirectFBDisplayLayer::SetBackgroundMode方法的典型用法代码示例。如果您正苦于以下问题:C++ IDirectFBDisplayLayer::SetBackgroundMode方法的具体用法?C++ IDirectFBDisplayLayer::SetBackgroundMode怎么用?C++ IDirectFBDisplayLayer::SetBackgroundMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDirectFBDisplayLayer
的用法示例。
在下文中一共展示了IDirectFBDisplayLayer::SetBackgroundMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
&provider ));
desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT;
desc.width = layer_config.width;
desc.height = layer_config.height;
DFBCHECK(dfb->CreateSurface( dfb, &desc, &bgsurface ) );
provider->RenderTo( provider, bgsurface, NULL );
provider->Release( provider );
DFBCHECK(bgsurface->SetFont( bgsurface, font ));
bgsurface->SetColor( bgsurface, 0xCF, 0xCF, 0xFF, 0xFF );
bgsurface->DrawString( bgsurface,
"Move the mouse over a window to activate it.",
-1, 10, 0, DSTF_LEFT | DSTF_TOP );
bgsurface->SetColor( bgsurface, 0xFF, 0xCF, 0xFF, 0xFF );
bgsurface->DrawString( bgsurface,
"You can drag them around, too, if you want.",
-1, 10 , 40, DSTF_LEFT | DSTF_TOP );
bgsurface->SetColor( bgsurface, 0xCF, 0xCF, 0xFF, 0xFF );
bgsurface->DrawString( bgsurface,
"The one with funky stuff happening and things flying around is an evas.",
-1, 10, 80, DSTF_LEFT | DSTF_TOP );
layer->SetBackgroundImage( layer, bgsurface );
layer->SetBackgroundMode( layer, DLBM_IMAGE );
}
{
DFBWindowDescription desc;
desc.flags = ( DWDESC_POSX | DWDESC_POSY |
DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS );
desc.posx = 20;
desc.posy = 120;
desc.width = 200;
desc.height = 200;
desc.caps = DWCAPS_ALPHACHANNEL;
DFBCHECK( layer->CreateWindow( layer, &desc, &window2 ) );
window2->GetSurface( window2, &window_surface2 );
window2->SetOpacity( window2, 0xFF );
window2->CreateEventBuffer( window2, &buffer );
{
window_surface2->SetColor( window_surface2,
0x00, 0x30, 0x10, 0xc0 );
window_surface2->DrawRectangle( window_surface2, 0, 0,
desc.width, desc.height );
window_surface2->SetColor( window_surface2,
0x80, 0xa0, 0x00, 0x90 );
window_surface2->FillRectangle( window_surface2, 1, 1,
desc.width-2, desc.height-2 );
DFBCHECK(window_surface2->SetFont(window_surface2, font ));
window_surface2->SetColor( window_surface2, 0xCF, 0xFF, 0xCF, 0xFF );