private void drawPoints(Image<Bgr, byte> im, List<PointF> points) { foreach (var pt in points) { /*im[(int)pt.Y, (int)pt.X] = new Bgr(Color.Red); continue;*/ var rect = new RectangleF(pt.X, pt.Y, 1, 1); rect.Inflate(winSize / 2, winSize / 2); im.Draw(rect, System.Drawing.Color.Red.ToBgr(), 3); } }
/// <summary> /// Inflate Shared Method /// </summary> /// /// <remarks> /// Produces a new RectangleF by inflating an existing /// RectangleF by the specified coordinate values. /// </remarks> public static RectangleF Inflate(RectangleF rect, float x, float y) { RectangleF ir = new RectangleF(rect.X, rect.Y, rect.Width, rect.Height); ir.Inflate(x, y); return ir; }