You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# include "stdafx.h"
# include "PanMotionGraphDrawer.h"
# include "SelectedItemMotionGraphDrawer.h"
void PanMotionGraphDrawer : : FirstDraw ( CDC * pDC , Gdiplus : : Matrix * matrix , int mouseX , int mouseY )
{
CPoint mousePt ( mouseX , mouseY ) ;
m_rubberLine . SetOriginPoint ( mousePt ) ;
CopyMatrix ( matrix ) ;
if ( m_pSIMGDrawer ! = NULL )
{
m_pSIMGDrawer - > Translate ( m_matrix ) ; //绘制变换之后的图元
m_pSIMGDrawer - > Draw ( pDC ) ;
}
DrawBoundShape ( pDC ) ;
}
void PanMotionGraphDrawer : : Draw ( CDC * pDC , Gdiplus : : Matrix * matrix , int mouseX , int mouseY )
{
CPoint moustPt ( mouseX , mouseY ) ;
m_rubberLine . Draw ( pDC , moustPt ) ;
if ( m_pSIMGDrawer ! = NULL )
{
m_pSIMGDrawer - > Translate ( m_matrix ) ; //擦除老的图元
m_pSIMGDrawer - > Draw ( pDC ) ;
}
DrawBoundShape ( pDC ) ;
CopyMatrix ( matrix ) ;
if ( m_pSIMGDrawer ! = NULL )
{
m_pSIMGDrawer - > Translate ( m_matrix ) ; //绘制变换之后的图元
m_pSIMGDrawer - > Draw ( pDC ) ;
}
DrawBoundShape ( pDC ) ;
}
//修复Bug:区域截屏时,平移截图区域。点击截图之后,截图区域矩形没有消失。
//出现这个Bug的原因是, 平移选择框时, 未擦除外包矩形。
//Tracker的外包矩形和TransformMotiveGraphDrawer的外包矩形绘制的颜色不一样。
//导致Tracker擦除不了此类生成的外包矩形
void PanMotionGraphDrawer : : Erease ( CDC * pDC )
{
m_rubberLine . Erease ( pDC ) ;
DrawBoundShape ( pDC ) ;
}