Browse Source

Merge branch 'master' into fixes/12.12.2024

Krzysztof Krysiński 8 months ago
parent
commit
5aec65db25

+ 3 - 3
src/ChunkyImageLib/Operations/EllipseOperation.cs

@@ -107,7 +107,7 @@ internal class EllipseOperation : IMirroredDrawOperation
                     surf.Canvas.DrawRect((RectD)ellipseFillRect!.Value, paint);
                 }
                 
-                paint.Color = strokeColor;
+                paint.Color = strokeWidth <= 0 ? fillColor : strokeColor;
                 paint.StrokeWidth = 1f;
                 surf.Canvas.DrawPoints(PointMode.Points, ellipse!, paint);
             }
@@ -165,9 +165,9 @@ internal class EllipseOperation : IMirroredDrawOperation
         surf.Canvas.DrawOval(fillRect.Center, fillRect.Size / 2f, paint);
         
         paint.IsAntiAliased = true;
-        paint.Color = strokeColor;
+        paint.Color = strokeWidth <= 0 ? fillColor : strokeColor;
         paint.Style = PaintStyle.Stroke;
-        paint.StrokeWidth = strokeWidth;
+        paint.StrokeWidth = strokeWidth <= 0 ? 1f : strokeWidth;
         
         RectD strokeRect = ((RectD)location).Inflate((-strokeWidth / 2f));
         

+ 2 - 2
src/ChunkyImageLib/Operations/RectangleOperation.cs

@@ -86,8 +86,8 @@ internal class RectangleOperation : IMirroredDrawOperation
 
         // draw stroke
         surf.Canvas.Save();
-        paint.StrokeWidth = (float)Data.StrokeWidth;
-        paint.Color = Data.StrokeColor;
+        paint.StrokeWidth = Data.StrokeWidth > 0 ? Data.StrokeWidth : 1;
+        paint.Color = Data.StrokeWidth > 0 ? Data.StrokeColor : Data.FillColor;
         paint.Style = PaintStyle.Stroke;
         RectD innerRect = rect.Inflate(-Data.StrokeWidth / 2f);
         surf.Canvas.DrawRect((float)innerRect.Left, (float)innerRect.Top, (float)innerRect.Width, (float)innerRect.Height, paint);

+ 2 - 2
src/PixiEditor/Properties/AssemblyInfo.cs

@@ -41,5 +41,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.31")]
-[assembly: AssemblyFileVersion("2.0.0.31")]
+[assembly: AssemblyVersion("2.0.0.32")]
+[assembly: AssemblyFileVersion("2.0.0.32")]