예제 #1
0
        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();
        }
예제 #2
0
 // === AbstractWrappingFigure ==========
 protected override Rectangle?CalcSelfBounds()
 {
     return(PointUtil.CircumscribeRect(_edgePoints));
 }