mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 00:16:36 +08:00
暂时存一版
This commit is contained in:
@@ -6,7 +6,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public static partial class PathGenerators
|
||||
{
|
||||
public static double SourceMarkerAdjustement(PointBase[] route, double markerWidth)
|
||||
public static double SourceMarkerAdjustement(PointBase[] route, double markerWidth, double markerHeight)
|
||||
{
|
||||
var angleInRadians = Math.Atan2(route[1].Y - route[0].Y, route[1].X - route[0].X) + Math.PI;
|
||||
var xChange = markerWidth * Math.Cos(angleInRadians);
|
||||
@@ -15,7 +15,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return angleInRadians * 180 / Math.PI;
|
||||
}
|
||||
|
||||
public static double TargetMarkerAdjustement(PointBase[] route, double markerWidth)
|
||||
public static double TargetMarkerAdjustement(PointBase[] route, double markerWidth, double markerHeight)
|
||||
{
|
||||
var angleInRadians = Math.Atan2(route[route.Length - 1].Y - route[route.Length - 2].Y, route[route.Length - 1].X - route[route.Length - 2].X);
|
||||
var xChange = markerWidth * Math.Cos(angleInRadians);
|
||||
|
||||
Reference in New Issue
Block a user