mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-07 02:00:50 +08:00
绘图形状补充一部分
This commit is contained in:
@@ -47,7 +47,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
ClearOldValue<DrawMode>(nameof(DrawingDrawMode));
|
||||
DrawingDrawMode = drawingDrawMode;
|
||||
CursorMode = CursorMode.Normal;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -193,14 +192,13 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
set
|
||||
{
|
||||
var oldvalue = _drawingDrawMode;
|
||||
SetProperty(ref _drawingDrawMode, value);
|
||||
DrawingDrawModeSelected = true;
|
||||
if (value == DrawMode.ColorPicker)
|
||||
{
|
||||
SetOldValue(oldvalue, nameof(DrawingDrawMode));
|
||||
CursorMode = CursorMode.ColorPicker;
|
||||
SetOldValue(_drawingDrawMode, nameof(DrawingDrawMode));
|
||||
}
|
||||
SetProperty(ref _drawingDrawMode, value);
|
||||
DrawingDrawModeSelected = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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