@@ -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));
@@ -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;
RectD innerRect = rect.Inflate(-Data.StrokeWidth / 2f);
surf.Canvas.DrawRect((float)innerRect.Left, (float)innerRect.Top, (float)innerRect.Width, (float)innerRect.Height, paint);