예제 #1
0
파일: DrawLine.cs 프로젝트: Xaprice/XView
        public override MeasureListItem GetMeasureListItem()
        {
            MeasureListItem item = new MeasureListItem();

            item.ToolType = "Ö±Ïß";
            item.Length   = CalcLenght(this.startPoint, this.endPoint);
            return(item);
        }
예제 #2
0
        public override MeasureListItem GetMeasureListItem()
        {
            MeasureListItem item = new MeasureListItem();

            item.ToolType  = "╬ьпн";
            item.Area      = rectangle.Width * rectangle.Height;
            item.Perimeter = (rectangle.Width + rectangle.Height) * 2;
            return(item);
        }
예제 #3
0
        public override MeasureListItem GetMeasureListItem()
        {
            MeasureListItem item = new MeasureListItem();

            item.ToolType = "═он▓";

            int a = Math.Max(Rectangle.Width, Rectangle.Height); // ═он▓│цор
            int b = Math.Min(Rectangle.Width, Rectangle.Height); //═он▓Х╠ор

            item.Area      = Math.PI * a * b;                    //═он▓├Т╗§Б║s=pi*a*b
            item.Perimeter = 2 * Math.PI * b + 4.0 * (a - b);    //═он▓о▄│цБ║ c = 2*pi*b+4(a-b)
            item.Radius    = (a + b) / 2.0;

            return(item);
        }
예제 #4
0
        public override MeasureListItem GetMeasureListItem()
        {
            MeasureListItem item = new MeasureListItem();

            item.ToolType = "ÇúÕÛÏß";

            double totalLength = 0;

            if (this.pointArray.Count >= 2)
            {
                for (int i = 1; i < this.pointArray.Count; i++)
                {
                    totalLength += CalcLenght(pointArray[i], pointArray[i - 1]);
                }
            }
            item.Length = totalLength;
            return(item);
        }