seqprocessdlgdraw.cpp
来自「在人脸检测的基础之上,对嘴部的运动表情进行分析,进行语音模拟.」· C++ 代码 · 共 76 行
CPP
76 行
// SeqProcessDlgDraw.cpp : implementation file
//
#include "stdafx.h"
#include "SeqProcess.h"
#include "SeqProcessDlg.h"
#include "FnMath.h"
#include "Matrix.h"
#include "FnMatrix.h"
#include "FnImage.h"
#include "FnBitmap.h"
#include "DlgDraw.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// Create a math functions object
static FnMath fMath;
////////////////////////////////////////////////////////////////////////////////
void CSeqProcessDlg::InitializeDraw()
{
}
//-----------------------------------------
void CSeqProcessDlg::DrawCurrentImage()
//-----------------------------------------
{
bitmapDraw.Attach(dibSeq[currentFrame].m_hBitmap);
dcMemDraw.SelectObject( &bitmapDraw);
bitmapDraw.Detach();
m_width = dibSeq[currentFrame].m_lpBMIH->biWidth;
m_height = dibSeq[currentFrame].m_lpBMIH->biHeight;
DrawdcMem2dc(); // Draw the current frame on screen
// draws motion vectors on current frame
}
////////////////////////////////////////////////////////////////////////////////
void CSeqProcessDlg::DrawdcMem2dc()
{
CClientDC dc(this);
dc.StretchBlt( xPosWindow, yPosWindow, scale*m_width, scale*m_height,
&dcMemDraw, 0, 0, m_width, m_height, SRCCOPY);
}
////////////////////////////////////////////////////////////////////////////////
void CSeqProcessDlg::DrawMatrix(matrix& image, int xPos, int yPos, int ScaleFac, CString text)
{
CDlgDraw *pDlg = new CDlgDraw;
pDlg->m_windowText = text;
pDlg->m_Image = image;
pDlg->m_scale = ScaleFac;
pDlg->m_posX = xPos;
pDlg->m_posY = yPos;
pDlg->Create( IDD_DRAW_DIALOG);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?