图像编辑

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);
}

你可能感兴趣的:(图像编辑)