|
@@ -89,14 +89,18 @@ public partial class ImageEditor : UserControl
|
|
|
switch (mode)
|
|
|
{
|
|
|
case ImageEditingMode.Polyline:
|
|
|
- var line = new Polyline
|
|
|
- {
|
|
|
- Points = [new(0, 0), new(20, 8), new(5, 16), new(25, 25)],
|
|
|
- Width = 25,
|
|
|
- Height = 25
|
|
|
- };
|
|
|
- line.Bind(Polyline.StrokeProperty, new Binding(nameof(PrimaryBrush)) { Source = this });
|
|
|
- ShapeButton.Content = line;
|
|
|
+ var canvas = new Canvas();
|
|
|
+ var points = new Point[] { new(0, 0), new(20, 8), new(5, 16), new(25, 25) };
|
|
|
+ var line1 = new Polyline { Points = points, Width = 25, Height = 25 };
|
|
|
+ var line2 = new Polyline { Points = points, Width = 25, Height = 25 };
|
|
|
+ line1.StrokeThickness = 4;
|
|
|
+ line1.StrokeLineCap = PenLineCap.Round;
|
|
|
+ line2.StrokeThickness = 1.5;
|
|
|
+ line1.Stroke = new SolidColorBrush(Colors.Black);
|
|
|
+ line2.Bind(Polyline.StrokeProperty, new Binding(nameof(PrimaryBrush)) { Source = this });
|
|
|
+ canvas.Children.Add(line1);
|
|
|
+ canvas.Children.Add(line2);
|
|
|
+ ShapeButton.Content = canvas;
|
|
|
break;
|
|
|
}
|
|
|
}
|