Bladeren bron

Fixed rendering dispatcher and shape aliasing

flabbet 10 maanden geleden
bovenliggende
commit
7431d22027

+ 1 - 1
src/Drawie

@@ -1 +1 @@
-Subproject commit 3afa69b40c494569b6337e1f892eacf906145a81
+Subproject commit ffe1fe7743584bd32cc6b3f6316b13727c21e5fa

+ 2 - 2
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Shapes/Data/EllipseVectorData.cs

@@ -45,8 +45,8 @@ public class EllipseVectorData : ShapeVectorData, IReadOnlyEllipseData
             saved = drawingSurface.Canvas.Save();
             ApplyTransformTo(drawingSurface);
         }
-        
-        using Paint shapePaint = new Paint();
+
+        using Paint shapePaint = new Paint() { IsAntiAliased = true };
         
         shapePaint.Color = FillColor;
         shapePaint.Style = PaintStyle.Fill;

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Shapes/Data/LineVectorData.cs

@@ -55,7 +55,7 @@ public class LineVectorData(VecD startPos, VecD pos) : ShapeVectorData, IReadOnl
             ApplyTransformTo(drawingSurface);
         }
 
-        using Paint paint = new Paint();
+        using Paint paint = new Paint() { IsAntiAliased = true };
 
         paint.Color = StrokeColor;
         paint.Style = PaintStyle.Stroke;

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/Shapes/Data/RectangleVectorData.cs

@@ -44,7 +44,7 @@ public class RectangleVectorData : ShapeVectorData, IReadOnlyRectangleData
             ApplyTransformTo(drawingSurface);
         }
 
-        using Paint paint = new Paint();
+        using Paint paint = new Paint() { IsAntiAliased = true };
         
         paint.Color = FillColor;
         paint.Style = PaintStyle.Fill;

+ 0 - 9
src/PixiEditor/Views/Rendering/AvaloniaRenderingDispatcher.cs

@@ -1,9 +0,0 @@
-using Avalonia.Threading;
-using Drawie.Backend.Core;
-
-namespace PixiEditor.Views.Rendering;
-
-public class AvaloniaRenderingDispatcher : IRenderingDispatcher
-{
-    public Action<Action> Invoke { get; } = action => Dispatcher.UIThread.Invoke(action);
-}