本文整理汇总了C++中wxBitmap::GetDirectFBSurface方法的典型用法代码示例。如果您正苦于以下问题:C++ wxBitmap::GetDirectFBSurface方法的具体用法?C++ wxBitmap::GetDirectFBSurface怎么用?C++ wxBitmap::GetDirectFBSurface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxBitmap
的用法示例。
在下文中一共展示了wxBitmap::GetDirectFBSurface方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoDrawSubBitmap
void wxDC::DoDrawSubBitmap(const wxBitmap &bmp,
wxCoord x, wxCoord y, wxCoord w, wxCoord h,
wxCoord destx, wxCoord desty, int rop, bool useMask)
{
wxCHECK_RET( Ok(), wxT("invalid dc") );
wxCHECK_RET( bmp.Ok(), wxT("invalid bitmap") );
// NB: we could also support XOR here (via DSBLIT_XOR)
// and possibly others via SetSrc/DstBlendFunction()
wxCHECK_RET( rop == wxCOPY, _T("only wxCOPY function supported") );
if ( bmp.GetDepth() == 1 )
{
// Mono bitmaps are handled in special way -- all 1s are drawn in
// foreground colours, all 0s in background colour.
wxFAIL_MSG( _T("drawing mono bitmaps not implemented") );
return;
}
if ( useMask && bmp.GetMask() )
{
// FIXME_DFB: see MGL sources for a way to do it, but it's not directly
// applicable because DirectFB doesn't implement ROPs; OTOH,
// it has blitting modes that can be useful; finally, see
// DFB's SetSrcBlendFunction() and SetSrcColorKey()
wxFAIL_MSG( _T("drawing bitmaps with masks not implemented") );
return;
}
DoBlitFromSurface(bmp.GetDirectFBSurface(),
x, y,
w, h,
destx, desty);
}
示例2: DoSelect
void wxMemoryDC::DoSelect(const wxBitmap& bitmap)
{
m_bmp = bitmap;
if ( !bitmap.Ok() )
{
// select the bitmap out of the DC
m_surface = NULL;
return;
}
// init the DC for drawing to this bitmap
DFBInit(bitmap.GetDirectFBSurface());
}