mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-19 16:06:35 +08:00
暂时存一版
This commit is contained in:
@@ -17,19 +17,19 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
route = GetRouteWithCurvePoints(link, route);
|
||||
|
||||
double sourceAngle = SourceMarkerAdjustement(route, link.GetSourceMarkerWidth());
|
||||
double targetAngle = TargetMarkerAdjustement(route, link.GetSinkMarkerWidth());
|
||||
double sourceAngle = SourceMarkerAdjustement(route, link.GetSourceMarkerWidth(), link.GetSourceMarkerHeight());
|
||||
double targetAngle = TargetMarkerAdjustement(route, link.GetSinkMarkerWidth(), link.GetSinkMarkerHeight());
|
||||
|
||||
DoShift(route, link);
|
||||
|
||||
var path = FormattableString.Invariant($"M {route[0].X} {route[0].Y} C {route[1].X} {route[1].Y}, {route[2].X} {route[2].Y}, {route[3].X} {route[3].Y}");
|
||||
return new PathGeneratorResult(new[] { path }, sourceAngle, route[0], targetAngle, route[route.Length - 1]);
|
||||
return new PathGeneratorResult(new[] { path }, sourceAngle, route[0], targetAngle, route[route.Length - 1], route);
|
||||
}
|
||||
|
||||
private static PathGeneratorResult CurveThroughPoints(PointBase[] route, ConnectionViewModel link)
|
||||
{
|
||||
double sourceAngle = SourceMarkerAdjustement(route, link.GetSourceMarkerWidth());
|
||||
double targetAngle = TargetMarkerAdjustement(route, link.GetSinkMarkerWidth());
|
||||
double sourceAngle = SourceMarkerAdjustement(route, link.GetSourceMarkerWidth(), link.GetSourceMarkerHeight());
|
||||
double targetAngle = TargetMarkerAdjustement(route, link.GetSinkMarkerWidth(), link.GetSinkMarkerHeight());
|
||||
|
||||
BezierSpline.GetCurveControlPoints(route, out var firstControlPoints, out var secondControlPoints);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
// Todo: adjust marker positions based on closest control points
|
||||
return new PathGeneratorResult(paths, sourceAngle, route[0], targetAngle, route[route.Length - 1]);
|
||||
return new PathGeneratorResult(paths, sourceAngle, route[0], targetAngle, route[route.Length - 1], route);
|
||||
}
|
||||
|
||||
private static PointBase[] GetRouteWithCurvePoints(ConnectionViewModel link, PointBase[] route)
|
||||
|
||||
Reference in New Issue
Block a user