修复复制粘贴是位置不能重叠
This commit is contained in:
parent
1af6b54b1f
commit
10208dedcc
@ -72,6 +72,7 @@ namespace PBAnaly.Module
|
||||
#region 变量
|
||||
private ShapeForm curShape = ShapeForm.None;
|
||||
private int curShapeIndex;
|
||||
private System.Drawing.Point curShapePoint;
|
||||
|
||||
public int ImageIndex { get; set; }// 图片加载进来的序号
|
||||
public bool Arrangement { get; set; }
|
||||
@ -1643,7 +1644,7 @@ namespace PBAnaly.Module
|
||||
curShape = ShapeForm.Polygon;
|
||||
|
||||
}
|
||||
|
||||
curShapePoint = readLoction;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1681,11 +1682,25 @@ namespace PBAnaly.Module
|
||||
case ShapeForm.Polygon:
|
||||
break;
|
||||
case ShapeForm.Rect:
|
||||
|
||||
System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(curShapePoint, new System.Drawing.Size(oldCopyRect.rect.Width,oldCopyRect.rect.Height));
|
||||
oldCopyRect.rect = rectangle;
|
||||
rectangles.Add(oldCopyRect);
|
||||
|
||||
break;
|
||||
case ShapeForm.Circle:
|
||||
int offsetX = curShapePoint.X - oldCopyCircle.center.X;
|
||||
int offsetY = curShapePoint.Y - oldCopyCircle.center.Y;
|
||||
|
||||
// 更新圆心位置
|
||||
oldCopyCircle.center.X += offsetX;
|
||||
oldCopyCircle.center.Y += offsetY;
|
||||
System.Drawing.Point point = new System.Drawing.Point(oldCopyCircle.Radius.X, oldCopyCircle.Radius.Y);
|
||||
point.X += offsetX;
|
||||
point.Y += offsetY;
|
||||
oldCopyCircle.Radius = point;
|
||||
|
||||
|
||||
|
||||
CircleAndInfoList.Add(oldCopyCircle);
|
||||
break;
|
||||
default:
|
||||
|
2
src/PBAnaly/UI/BioanalyImagePanel.Designer.cs
generated
2
src/PBAnaly/UI/BioanalyImagePanel.Designer.cs
generated
@ -364,7 +364,7 @@
|
||||
this.ctms_strop_stickup,
|
||||
this.ctms_strop_delete});
|
||||
this.ctms_strop.Name = "ctms_strop";
|
||||
this.ctms_strop.Size = new System.Drawing.Size(181, 98);
|
||||
this.ctms_strop.Size = new System.Drawing.Size(101, 76);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user