2021-07-23 09:42:22 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
2023-01-12 23:02:53 +08:00
|
|
|
|
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
2021-07-23 09:42:22 +08:00
|
|
|
|
|
2022-10-28 22:45:39 +08:00
|
|
|
|
namespace AIStudio.Wpf.DiagramDesigner
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
public struct ConnectorInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
public double DesignerItemLeft { get; set; }
|
|
|
|
|
|
public double DesignerItemTop { get; set; }
|
2023-01-08 09:22:37 +08:00
|
|
|
|
public SizeBase DesignerItemSize { get; set; }
|
|
|
|
|
|
public PointBase Position { get; set; }
|
2021-07-23 09:42:22 +08:00
|
|
|
|
public ConnectorOrientation Orientation { get; set; }
|
2023-01-12 23:02:53 +08:00
|
|
|
|
|
|
|
|
|
|
public static ConnectorInfo GetConnectorInfo(ConnectorOrientation orientation, double left, double top, double width, double height, PointBase position)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new ConnectorInfo()
|
|
|
|
|
|
{
|
|
|
|
|
|
Orientation = orientation,
|
|
|
|
|
|
DesignerItemSize = new SizeBase(width, height),
|
|
|
|
|
|
DesignerItemLeft = left,
|
|
|
|
|
|
DesignerItemTop = top,
|
|
|
|
|
|
Position = position
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
2021-07-23 09:42:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|