CSize FrmSz(m_Size);
CSize SrcSz(vp->GetFrameSize());
CPoint SrcPt;
if (m_st.Mirror) {
FrmSz.cx = (FrmSz.cx + 1) >> 1;
FrmSz.cy = (FrmSz.cy + 1) >> 1;
switch (Quadrant) {
case 0: // upper left
SrcPt = CPoint(0, SrcSz.cy - 1);
SrcSz.cx >>= 1;
SrcSz.cy >>= 1;
SrcSz.cy = -SrcSz.cy;
break;
case 1: // upper right
SrcPt = CPoint(SrcSz.cx - 1, SrcSz.cy - 1);
SrcSz.cx >>= 1;
SrcSz.cy >>= 1;
SrcSz.cx = -SrcSz.cx;
SrcSz.cy = -SrcSz.cy;
break;
case 2: // lower left
SrcPt = CPoint(0, 0);
SrcSz.cx >>= 1;
SrcSz.cy >>= 1;
break;
case 3: // lower right
SrcPt = CPoint(SrcSz.cx - 1, 0);
SrcSz.cx >>= 1;
SrcSz.cy >>= 1;
SrcSz.cx = -SrcSz.cx;
break;
}
} else {
SrcPt = CPoint(0, SrcSz.cy - 1);
SrcSz.cy = -SrcSz.cy;
}
HDC sdc;
vp->GetDC(&sdc);
StretchBlt(dc, 0, 0, FrmSz.cx, FrmSz.cy, sdc,
SrcPt.x, SrcPt.y, SrcSz.cx, SrcSz.cy, m_VideoList.GetROP());
vp->ReleaseDC(sdc);
Tuesday, May 09, 2006
video mirroring quadrant selection
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment