本文整理汇总了C++中LPDIRECTDRAW::GetScanLine方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECTDRAW::GetScanLine方法的具体用法?C++ LPDIRECTDRAW::GetScanLine怎么用?C++ LPDIRECTDRAW::GetScanLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECTDRAW
的用法示例。
在下文中一共展示了LPDIRECTDRAW::GetScanLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INITDDSTRUCT
/******************************Public*Routine******************************\
* PresentImage
*
\**************************************************************************/
STDMETHODIMP
CMpegMovie::PresentImage(
DWORD_PTR dwUserID,
VMRPRESENTATIONINFO* lpPresInfo
)
{
#if 0
LPDIRECTDRAWSURFACE7 lpSurface = lpPresInfo->lpSurf;
const REFERENCE_TIME rtNow = lpPresInfo->rtStart;
const DWORD dwSurfaceFlags = lpPresInfo->dwFlags;
if(m_iDuration > 0)
{
HRESULT hr;
RECT rs, rd;
DDSURFACEDESC2 ddsdV;
INITDDSTRUCT(ddsdV);
hr = lpSurface->GetSurfaceDesc(&ddsdV);
DDSURFACEDESC2 ddsdP;
INITDDSTRUCT(ddsdP);
hr = m_pddsPriText->GetSurfaceDesc(&ddsdP);
FLOAT fPos = (FLOAT)m_iDuration / 30.0F;
FLOAT fPosInv = 1.0F - fPos;
SetRect(&rs, 0, 0,
MulDiv((int)ddsdV.dwWidth, 30 - m_iDuration, 30),
ddsdV.dwHeight);
SetRect(&rd, 0, 0,
MulDiv((int)ddsdP.dwWidth, 30 - m_iDuration, 30),
ddsdP.dwHeight);
hr = m_pddsRenderT->Blt(&rd, lpSurface,
&rs, DDBLT_WAIT, NULL);
SetRect(&rs, 0, 0,
MulDiv((int)ddsdP.dwWidth, m_iDuration, 30),
ddsdP.dwHeight);
SetRect(&rd,
(int)ddsdP.dwWidth - MulDiv((int)ddsdP.dwWidth, m_iDuration, 30),
0,
ddsdP.dwWidth,
ddsdP.dwHeight);
hr = m_pddsRenderT->Blt(&rd, m_pddsPriText,
&rs, DDBLT_WAIT, NULL);
//
// need to wait for VBlank before blt-ing
//
{
LPDIRECTDRAW lpdd;
hr = m_pddsPrimary->GetDDInterface((LPVOID*)&lpdd);
if(SUCCEEDED(hr))
{
DWORD dwScanLine;
for(; ;)
{
hr = lpdd->GetScanLine(&dwScanLine);
if(hr == DDERR_VERTICALBLANKINPROGRESS)
{
break;
}
if(FAILED(hr))
{
break;
}
if((LONG)dwScanLine>= rd.top)
{
if((LONG)dwScanLine <= rd.bottom)
{
continue;
}
}
break;
}
RELEASE(lpdd);
}
}
hr = m_pddsPrimary->Blt(NULL, m_pddsRenderT,
NULL, DDBLT_WAIT, NULL);
m_iDuration--;
if(m_iDuration == 0 && (ddsdV.ddsCaps.dwCaps & DDSCAPS_OVERLAY))
{
// need to get the color key visible again.
//.........这里部分代码省略.........