mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-15 05:56:36 +08:00
嗯,自动获取曲线方向
This commit is contained in:
@@ -69,7 +69,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
var cX = (route[0].X + route[1].X) / 2;
|
||||
var cY = (route[0].Y + route[1].Y) / 2;
|
||||
var curvePointA = GetCurvePoint(route[0].X, route[0].Y, cX, cY, link.SourceConnectorInfo?.Orientation);
|
||||
|
||||
var sourceOrientation = link.SourceConnectorInfo?.Orientation;
|
||||
if (sourceOrientation == ConnectorOrientation.None)//按照线条的四象限来处理。
|
||||
{
|
||||
var slope = (route[1].Y - route[0].Y) / (route[1].X - route[0].X);
|
||||
|
||||
}
|
||||
var curvePointA = GetCurvePoint(route[0].X, route[0].Y, cX, cY, sourceOrientation);
|
||||
var curvePointB = GetCurvePoint(route[1].X, route[1].Y, cX, cY, link.SinkConnectorInfo?.Orientation);
|
||||
return new[] { route[0], curvePointA, curvePointB, route[1] };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user