Browse Source

Added anchor handle border

flabbet 10 months ago
parent
commit
1f95abd968
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/PixiEditor/Views/Overlays/Handles/AnchorHandle.cs

+ 10 - 0
src/PixiEditor/Views/Overlays/Handles/AnchorHandle.cs

@@ -1,4 +1,5 @@
 using Avalonia.Controls;
+using Avalonia.Media;
 using PixiEditor.DrawingApi.Core.Numerics;
 using PixiEditor.Extensions.UI.Overlays;
 using PixiEditor.Numerics;
@@ -7,8 +8,17 @@ namespace PixiEditor.Views.Overlays.Handles;
 
 public class AnchorHandle : RectangleHandle
 {
+    private Pen pen;
     public AnchorHandle(Overlay owner) : base(owner)
     {
         Size = new VecD(GetResource<double>("AnchorHandleSize"));
+        pen = new Pen(GetResource<SolidColorBrush>("HandleBrush"));
+        HandlePen = pen;
+    }
+
+    public override void Draw(DrawingContext context)
+    {
+        pen.Thickness = 1.0 / ZoomScale;
+        base.Draw(context);
     }
 }