本文整理汇总了C++中IDirectFBWindow::SetSrcGeometry方法的典型用法代码示例。如果您正苦于以下问题:C++ IDirectFBWindow::SetSrcGeometry方法的具体用法?C++ IDirectFBWindow::SetSrcGeometry怎么用?C++ IDirectFBWindow::SetSrcGeometry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDirectFBWindow
的用法示例。
在下文中一共展示了IDirectFBWindow::SetSrcGeometry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static DFBResult
Test_SrcGeometry( IDirectFBDisplayLayer *layer, void *arg )
{
int i;
IDirectFBWindow *window;
DFBWindowGeometry geometry;
DFBDimension size;
D_ASSERT( m_toplevel_id != 0 );
/*
* Get the top level window
*/
_T( layer->GetWindow( layer, arg ? (unsigned long) arg : m_toplevel_id, &window ) );
window->GetSize( window, &size.w, &size.h );
/*
* Change source geometry
*/
{
DFBRectangle rects[] = { { 0, 0, size.w / 2, size.h / 2 },
{ size.w / 2, 0, size.w / 2, size.h / 2 },
{ size.w / 2, size.h / 2, size.w / 2, size.h / 2 },
{ 0, size.h / 2, size.w / 2, size.h / 2 }
};
for (i=0; i<D_ARRAY_SIZE(rects); i++) {
SHOW_TEST( "SetSrcGeometry( %4d,%4d-%4dx%4d - [%02d] )...", DFB_RECTANGLE_VALS(&rects[i]), i );
geometry.mode = DWGM_RECTANGLE;
geometry.rectangle = rects[i];
_T( window->SetSrcGeometry( window, &geometry ) );
SHOW_RESULT( "...SetSrcGeometry( %4d,%4d-%4dx%4d - [%02d] ) done.", DFB_RECTANGLE_VALS(&rects[i]), i );
}
}
SHOW_TEST( "SetSrcGeometry( DEFAULT )..." );
geometry.mode = DWGM_DEFAULT;
_T( window->SetSrcGeometry( window, &geometry ) );
SHOW_RESULT( "...SetSrcGeometry( DEFAULT ) done." );
window->Release( window );
return DFB_OK;
}