本文整理汇总了C++中IRect::Size方法的典型用法代码示例。如果您正苦于以下问题:C++ IRect::Size方法的具体用法?C++ IRect::Size怎么用?C++ IRect::Size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRect
的用法示例。
在下文中一共展示了IRect::Size方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BltBitmap
bool VMware::BltBitmap(SrvBitmap *pcDstBitmap, SrvBitmap *pcSrcBitmap,
IRect cSrcRect, IRect cDstRect, int nMode, int nAlpha)
{
if(((!pcDstBitmap->m_bVideoMem) && (!pcSrcBitmap->m_bVideoMem)) || nMode != DM_COPY || cSrcRect.Size() != cDstRect.Size())
{
// Off-screen to off-screen
return DisplayDriver::BltBitmap(pcDstBitmap, pcSrcBitmap, cSrcRect,
cDstRect, nMode, nAlpha);
}
IPoint cDstPos = cDstRect.LeftTop();
int srcX = cSrcRect.left;
int srcY = cSrcRect.top;
int dstX = cDstPos.x;
int dstY = cDstPos.y;
int width = cSrcRect.Width() + 1;
int height = cSrcRect.Height() + 1;
bool accelDmCopy = false;
if((pcDstBitmap->m_bVideoMem) && (pcSrcBitmap->m_bVideoMem))
{
if(nMode == DM_COPY)
accelDmCopy = m_regCapabilities & SVGA_CAP_RECT_COPY;
else if(nMode == DM_OVER)
dbprintf("VMware::BltBitmap() - Screen to screen DM_OVER\n");
else if(nMode == DM_BLEND)
dbprintf("VMware::BltBitmap() - Screen to screen DM_BLEND\n");
else
dbprintf("VMware::BltBitmap() - Unknown nMode = %d\n", nMode);
}
// ACQUIRE lock
m_cGELock.Lock();
if(accelDmCopy)
{
// Accelerated screen to screen DM_COPY
Fifo_RectCopy(srcX, srcY, dstX, dstY, width, height);
m_bFifoCmds = true;
}
else
{
if(m_bFifoCmds)
FifoSync();
DisplayDriver::BltBitmap(pcDstBitmap, pcSrcBitmap, cSrcRect,
cDstRect, nMode, nAlpha);
if(pcDstBitmap->m_bVideoMem)
Fifo_UpdateRect(dstX, dstY, width, height);
}
// RELEASE lock
m_cGELock.Unlock();
return true;
}