public void SetPoints(IEnumerable <Point> pts) { if (pts == null) { return; } var r = PointUtil.CircumscribeRect(pts); _points.Clear(); foreach (var pt in pts) { _points.Add(pt - (Size)r.Location); } if (_points.Count > 1) { Bounds = r; } else { Bounds = Rectangle.Empty; } InvalidatePaint(); }
// === AbstractWrappingFigure ========== protected override Rectangle?CalcSelfBounds() { return(PointUtil.CircumscribeRect(_edgePoints)); }