Bladeren bron

Fixed hardness 1 not having color

Krzysztof Krysiński 4 maanden geleden
bovenliggende
commit
a867b927c7

+ 6 - 2
src/PixiEditor.ChangeableDocument/Changes/Drawing/LineBasedPen_UpdateableChange.cs

@@ -152,10 +152,14 @@ internal class LineBasedPen_UpdateableChange : UpdateableChange
         }
     }
 
-    private RadialGradientPaintable? ApplySoftnessGradient(VecD pos)
+    private Paintable? ApplySoftnessGradient(VecD pos)
     {
-        if (hardness >= 1) return null;
         srcPaint.Paintable?.Dispose();
+        if (hardness >= 1)
+        {
+            return new ColorPaintable(color);
+        }
+
         float radius = strokeWidth / 2f;
         radius = MathF.Max(1, radius);
         return new RadialGradientPaintable(pos, radius,