GetUpperPoint() 공개 정적인 메소드

public static GetUpperPoint ( Point points ) : Point
points Point
리턴 Point
예제 #1
0
        private void CalcLinkSize()
        {
            if (!needCalcLinkSize)
            {
                return;
            }

            Size sizeTmp = Size.Empty;

            if (lines.Length > 1)
            {
                Point[] points = new Point[lines.Length * 2];
                int     i      = 0;
                foreach (LineElement ln in lines)
                {
                    points[i]     = ln.Point1;
                    points[i + 1] = ln.Point2;
                    i            += 2;
                }
                Point upper = DiagramUtil.GetUpperPoint(points);
                Point lower = DiagramUtil.GetLowerPoint(points);

                sizeTmp = new Size(lower.X - upper.X, lower.Y - upper.Y);
            }

            size = sizeTmp;

            needCalcLinkSize = false;
        }
예제 #2
0
        private void UpdateUpperSelectionPoint()
        {
            //Get upper selecion point
            Point[] points = new Point[document.SelectedElements.Count];
            int     p      = 0;

            foreach (BaseElement el in document.SelectedElements)
            {
                points[p] = el.Location;
                p++;
            }
            upperSelPoint = DiagramUtil.GetUpperPoint(points);
        }
예제 #3
0
        private void CalcLinkLocation()
        {
            //CalcLink();

            if (!needCalcLinkLocation)
            {
                return;
            }

            Point[] points = new Point[lines.Length * 2];
            int     i      = 0;

            foreach (LineElement ln in lines)
            {
                points[i]     = ln.Point1;
                points[i + 1] = ln.Point2;
                i            += 2;
            }

            location = DiagramUtil.GetUpperPoint(points);

            needCalcLinkLocation = false;
        }