From 12d533288e00f4bb10cfb253b867e76b01d50775 Mon Sep 17 00:00:00 2001 From: SaraP Date: Wed, 30 Jul 2025 15:08:44 +0200 Subject: [PATCH] DataWindow : - nel caso di vetro non rettangolare restituite le dimensioni del suo box. --- Designing/WinLib/WinCalculate.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Designing/WinLib/WinCalculate.lua b/Designing/WinLib/WinCalculate.lua index b03adc4..e831874 100644 --- a/Designing/WinLib/WinCalculate.lua +++ b/Designing/WinLib/WinCalculate.lua @@ -1603,6 +1603,11 @@ local function CalcFillGeo( nPartId, nOutlineLayerId) if bRect then EgtSetInfo( nGeoLayerId, WIN_GEOWIDTH, vtEdge1:len()) EgtSetInfo( nGeoLayerId, WIN_GEOHEIGHT, vtEdge2:len()) + else + -- se non รจ rettangolare salvo le dimensioni del suo box orientato in modo ottimale + local _, dDim1, dDim2 = EgtCurveMinAreaRectangleXY( nCompo) + EgtSetInfo( nGeoLayerId, WIN_GEOWIDTH, dDim1) + EgtSetInfo( nGeoLayerId, WIN_GEOHEIGHT, dDim2) end EgtErase( nCompo)