在这个例子中:
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
label10.Text = ((n - 1) * 4).ToString();
_mrect = new Rectangle(Math.Min(RectStartPoint.X, point.X), Math.Min(RectStartPoint.Y, point.Y),
Math.Abs(RectStartPoint.X - point.X), Math.Abs(RectStartPoint.Y - point.Y));
}
_mrect is:
X = 125
Y = 144
Width = 250
Height = 169
我想找到矩形左边缘到右边缘之间的距离。以及上边缘到下边缘之间的距离。
答案 0 :(得分:1)