From 10208dedcc963c97e637376e8174363fbce4c0d6 Mon Sep 17 00:00:00 2001 From: moco Date: Fri, 6 Dec 2024 00:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=8D=E5=88=B6=E7=B2=98?= =?UTF-8?q?=E8=B4=B4=E6=98=AF=E4=BD=8D=E7=BD=AE=E4=B8=8D=E8=83=BD=E9=87=8D?= =?UTF-8?q?=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/PBAnaly/Module/BioanalysisMannage.cs | 19 +++++++++++++++++-- src/PBAnaly/UI/BioanalyImagePanel.Designer.cs | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/PBAnaly/Module/BioanalysisMannage.cs b/src/PBAnaly/Module/BioanalysisMannage.cs index 7468664..dd7112f 100644 --- a/src/PBAnaly/Module/BioanalysisMannage.cs +++ b/src/PBAnaly/Module/BioanalysisMannage.cs @@ -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: diff --git a/src/PBAnaly/UI/BioanalyImagePanel.Designer.cs b/src/PBAnaly/UI/BioanalyImagePanel.Designer.cs index 616f377..d651ab2 100644 --- a/src/PBAnaly/UI/BioanalyImagePanel.Designer.cs +++ b/src/PBAnaly/UI/BioanalyImagePanel.Designer.cs @@ -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 //