public void DrawRectangle(Point start, Size size, double thickness, bool fill = false) { image.Mutate(ctx => ctx.DrawPolygon(Black, (float)thickness, new[] { new PointF((float)start.X, (float)start.Y), new PointF((float)start.X + (float)size.Width, (float)start.Y), new PointF((float)start.X + (float)size.Width, (float)start.Y + (float)size.Height), new PointF((float)start.X, (float)start.Y + (float)size.Height) })); }
public void DrawRectangle(Point start, Size size, double thickness, bool fill = false) { image.DrawPolygon(Black, 2.0f, new[] { new Vector2((float)start.X, (float)start.Y), new Vector2((float)start.X + (float)size.Width, (float)start.Y), new Vector2((float)start.X + (float)size.Width, (float)start.Y + (float)size.Height), new Vector2((float)start.X, (float)start.Y + (float)size.Height) }); }
public void DrawRectangle(Point start, Size size, double thickness, bool fill = false) { Pen.Thickness = thickness; Context.DrawRectangle(fill ? Brushes.Black : null, Pen, new Rect(start.ToWinPoint(), size.ToWinSize())); }