From b87480a30f8818784645e11ab3170fceb6653d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= Date: Wed, 29 Apr 2026 09:30:24 +0800 Subject: [PATCH] =?UTF-8?q?BGA=E8=87=AA=E5=8A=A8=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=B7=A5=E5=85=B7:BGA=E6=A3=80=E6=B5=8B=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E4=BB=A5=E5=8D=8A=E9=80=8F=E6=98=8E=E5=9B=BE=E5=B1=82=E5=8F=A0?= =?UTF-8?q?=E5=8A=A0=E5=9C=A8canvas=E4=B8=8A=E3=80=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=EF=BC=8C=E7=BB=9F=E4=B8=80=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controls/PolygonRoiCanvas.xaml.cs | 16 +++ XplorePlane/Assets/Icons/ok.png | Bin 0 -> 390 bytes XplorePlane/Assets/Icons/run32.png | Bin 0 -> 608 bytes .../ImageProcessing/BgaDetectionViewModel.cs | 43 ++++++- .../ImageProcessing/BgaDetectionPanel.xaml | 112 ++++++++++++------ 5 files changed, 131 insertions(+), 40 deletions(-) create mode 100644 XplorePlane/Assets/Icons/ok.png create mode 100644 XplorePlane/Assets/Icons/run32.png diff --git a/XP.ImageProcessing.RoiControl/Controls/PolygonRoiCanvas.xaml.cs b/XP.ImageProcessing.RoiControl/Controls/PolygonRoiCanvas.xaml.cs index 2473333..8c1d4b3 100644 --- a/XP.ImageProcessing.RoiControl/Controls/PolygonRoiCanvas.xaml.cs +++ b/XP.ImageProcessing.RoiControl/Controls/PolygonRoiCanvas.xaml.cs @@ -477,9 +477,25 @@ namespace XP.ImageProcessing.RoiControl.Controls _bubbleRoiResizing = false; _bubbleBrushDragging = false; _bubbleTool = BubbleSubTool.Roi; _bubbleUndoStack.Clear(); + // 清理外部叠加的结果图层(IsHitTestVisible=false 的 Image,排除背景图) + var toRemove = new System.Collections.Generic.List(); + foreach (UIElement child in mainCanvas.Children) + { + if (child is Image img && img != backgroundImage && !img.IsHitTestVisible) + toRemove.Add(child); + } + foreach (var el in toRemove) + mainCanvas.Children.Remove(el); } public void ClearMeasurements() => RemoveMeasureOverlay(); + + /// 从 mainCanvas 移除指定的 UI 元素(用于外部叠加层清理) + public void RemoveFromCanvas(System.Windows.UIElement element) + { + if (element != null && mainCanvas.Children.Contains(element)) + mainCanvas.Children.Remove(element); + } public int MeasureCount => _ppGroups.Count + _ptlGroups.Count + _angleGroups.Count + _frGroups.Count + _bgaGroups.Count; // ── 点击分发 ── diff --git a/XplorePlane/Assets/Icons/ok.png b/XplorePlane/Assets/Icons/ok.png new file mode 100644 index 0000000000000000000000000000000000000000..6794418e0c6dbf990add9073c9c3eb79323a5291 GIT binary patch literal 390 zcmV;10eSw3P)zF+)4V}im;!Us-_?=fte=1vkF21FPoeBodXJAj6(LJClL}3-bw(2CJCB%I_H#cytM+TFi2pU$L>+%$+EpEfJ6%kFE|)R0VEhC zyx~}XR{%*Gi6C&SZ6$z2CJ_vdb*%-E42kKV4EiC$NgxDJu5k%O-vPPhvi|`90RR6$ k4Sdc3000I_L_t&o0F1J_LCD5`rvLx|07*qoM6N<$g8WaFp#T5? literal 0 HcmV?d00001 diff --git a/XplorePlane/Assets/Icons/run32.png b/XplorePlane/Assets/Icons/run32.png new file mode 100644 index 0000000000000000000000000000000000000000..e14143b0f5cef8048f63e214a007beb8bccfae3a GIT binary patch literal 608 zcmV-m0-ybfP)7E-a|yl@8? z(ReG+P5=ZUI~)$#^Ogn19`E|vSf>C+fe(arp_vnu=}YSrfRN7zgTaMVSkG-;IEYRF zRP~7OP?6D@ma0I_=; - - - - - - + + + + + + + + + + @@ -97,10 +139,6 @@ - -