mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
绘图形状补充一部分
This commit is contained in:
@@ -11,11 +11,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
public static SharpPath Square { get; } = new SharpPath("M 0 -5 10 -5 10 5 0 5 z", 10, 10, PathStyle.Square, SizeStyle.Middle);
|
||||
public static SharpPath Triangle { get; } = new SharpPath("M1,21H23L12,2", 10, 10, PathStyle.Square, SizeStyle.Middle);
|
||||
public static SharpPath Rhombus { get; } = new SharpPath("M 0,20 L 30 0 L 60,20 L 30,40 Z", 10, 10, PathStyle.Square, SizeStyle.Middle);
|
||||
public static SharpPath Trapezoid { get; } = new SharpPath("M 0 0 H 60 L 50 40 H 10 Z", 10, 10, PathStyle.Square, SizeStyle.Middle);
|
||||
public static SharpPath Heart { get; } = new SharpPath("M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.78 7.77L10 18.78l8.39-8.4a5.5 5.5 0 0 0-7.78-7.77l-.61.61z", 10, 10, PathStyle.Square, SizeStyle.Middle);
|
||||
public static SharpPath Pentagram { get; } = new SharpPath("M 9,2 11,7 17,7 12,10 14,15 9,12 4,15 6,10 1,7 7,7 Z", 10, 10, PathStyle.Square, SizeStyle.Middle);
|
||||
public static SharpPath Hexagon { get; } = new SharpPath("M 0,20 L 10,0 H 50 L 60,20 L 50,40 H10 Z", 10, 10, PathStyle.Square, SizeStyle.Middle);
|
||||
|
||||
public static readonly Dictionary<PathStyle, string> ArrowDictionary = new Dictionary<PathStyle, string>()
|
||||
public static readonly Dictionary<PathStyle, string> SharpPathDictionary = new Dictionary<PathStyle, string>()
|
||||
{
|
||||
{ PathStyle.None, None.Path },
|
||||
{ PathStyle.Arrow, Arrow.Path },
|
||||
@@ -91,9 +91,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
if (SetProperty(ref _pathStyle, value))
|
||||
{
|
||||
if (ArrowDictionary.ContainsKey(_pathStyle))
|
||||
if (SharpPathDictionary.ContainsKey(_pathStyle))
|
||||
{
|
||||
Path = ArrowDictionary[_pathStyle];
|
||||
Path = SharpPathDictionary[_pathStyle];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user