Posted on 2011-10-28 10:08
polly 阅读(207)
评论(0) 编辑 收藏 引用 所属分类:
VC++学习
Pen pen(Color::Black);
int width = abs(m_vecPoint[1].X - m_vecPoint[0].X);
int height = abs(m_vecPoint[1].Y - m_vecPoint[0].Y);
if (width<0||height<0)
{
graphic.DrawRectangle(&pen,m_vecPoint[1].X,m_vecPoint[1].Y,width,height);
}
else{
graphic.DrawRectangle(&pen,m_vecPoint[0].X,m_vecPoint[0].Y,width,height);
}