Пример #1
0
        /// <summary>
        /// 调整连接线
        /// </summary>
        /// <param name="line">当前连接线</param>
        /// <param name="slotContainer">相关的插槽容器</param>
        private void AdjustLine(ConnectorContainer line , SlotContainer slotContainer)
        {
            Rectangle adjustRectangle = line.GetAdjustRectangle(background.CanvasSize, background.GridSize.Width);
            List<SlotContainer> totalSlotContainerList = regionManager.GetSlotContainerList(adjustRectangle);
            List<ConnectorContainer> totalLineList = regionManager.GetConnectorContainerList(adjustRectangle);

            line.AdjustLine(slotContainer, totalSlotContainerList, totalLineList, background.GridSize.Width, background.BaseSize, regionManager.CanvasGridBoard);
            line.AdjustRectangle();  
        }