コード例 #1
0
        override public void Prepare()
        {
            TArrowLine    Line, Lnb;
            Point         P = new Point(), P2 = new Point();
            int           tmp_x;
            TTfeRectShape Shape1, Shape2;

            Shape1 = (TTfeRectShape)(GetWorkShape(0));
            Shape2 = (TTfeRectShape)(GetWorkShape(1));
            Shape1.GetTailPoint(0, ref P);


            //1
            Line        = (TArrowLine)(GetWorkLine(0));
            Line.xStart = StartPoint.X;
            Line.yStart = StartPoint.Y;
            Line.xEnd   = P.X - 3 * F_Step;
            Line.yEnd   = P.Y + 4 * F_Step;
            Line.Bend   = CalcBend(Line.xStart, Line.xEnd);
            Lnb         = Line;

            //2
            Line        = (TArrowLine)(GetWorkLine(1));
            Line.xStart = Lnb.xEnd;
            Line.yStart = Lnb.yEnd;
            Line.xEnd   = P.X;
            Line.yEnd   = P.Y;
            Line.Bend   = CalcBend(Line.xStart, Line.xEnd);


            Shape1.GetTailPoint(1, ref P);
            Shape2.GetTailPoint(1, ref P2);

            tmp_x = P.X;
            if (tmp_x < P2.X)
            {
                tmp_x = P2.X;
            }
            tmp_x = tmp_x + 3 * F_Step;

            //3
            Line        = (TArrowLine)(GetWorkLine(2));
            Line.xStart = P.X;
            Line.yStart = P.Y;
            Line.xEnd   = tmp_x;
            Line.yEnd   = Lnb.yEnd;
            Line.Bend   = CalcBend(Line.xStart, Line.xEnd);
            VPoint      = new Point(Line.xStart, Line.yEnd);


            Line        = (TArrowLine)(GetWorkLine(3));
            Line.xStart = P2.X;
            Line.yStart = P2.Y;
            Line.xEnd   = tmp_x;
            Line.yEnd   = Lnb.yEnd;
            Line.Bend   = CalcBend(Line.xStart, Line.xEnd);


            Shape2.GetTailPoint(0, ref P2);
            //5
            Line        = (TArrowLine)(GetWorkLine(4));
            Line.xStart = Lnb.xEnd;
            Line.yStart = Lnb.yEnd;

            Line.xEnd = P2.X;
            Line.yEnd = P2.Y;
            Line.Bend = CalcBend(Line.xStart, Line.xEnd);

            //6
            Lnb             = (TArrowLine)(GetWorkLine(2));
            Line            = (TArrowLine)(GetWorkLine(5));
            Line.PointStart = Lnb.PointEnd;
            Line.xEnd       = Lnb.PointEnd.X + 2 * F_Step;
            Line.yEnd       = Lnb.PointEnd.Y;

            base.Prepare();
        }
コード例 #2
0
        void CreateLines()
        {
            TArrowLine    Line, Lnb;
            Point         P = new Point(), P2 = new Point();
            int           tmp_x;
            TTfeRectShape Shape1, Shape2;

            FreeWorkLines();
            F_LastLineId = F_NumberLineId;

            Shape1 = (TTfeRectShape)(GetWorkShape(0));
            Shape2 = (TTfeRectShape)(GetWorkShape(1));
            Shape1.GetTailPoint(0, ref P);


            F_LastLineId++;
            //1
            Line        = new TArrowLine(F_Step, F_LastLineId);
            Line.xStart = StartPoint.X;
            Line.yStart = StartPoint.Y;
            Line.xEnd   = P.X - 3 * F_Step;
            Line.yEnd   = P.Y + 4 * F_Step;
            Line.Bend   = CalcBend(Line.xStart, Line.xEnd);
            AddLine(Line);
            Lnb = Line;
            Shape1.AddWorkLine(Line);



            F_LastLineId++;
            //2
            Line        = new TArrowLine(F_Step, F_LastLineId);
            Line.xStart = Lnb.xEnd;
            Line.yStart = Lnb.yEnd;
            Line.xEnd   = P.X;
            Line.yEnd   = P.Y;
            Line.Bend   = CalcBend(Line.xStart, Line.xEnd);
            //stas   Line.Prepare();
            AddLine(Line);
            Shape1.AddWorkLine(Line);



            Shape1.GetTailPoint(1, ref P);
            Shape2.GetTailPoint(1, ref P2);

            tmp_x = P.X;
            if (tmp_x < P2.X)
            {
                tmp_x = P2.X;
            }
            tmp_x = tmp_x + 3 * F_Step;


            F_LastLineId++;
            //3
            Line        = new TArrowLine(F_Step, F_LastLineId);
            Line.xStart = P.X;
            Line.yStart = P.Y;

            Line.xEnd = tmp_x;
            Line.yEnd = Lnb.yEnd;
            Line.Bend = CalcBend(Line.xStart, Line.xEnd);
            AddLine(Line);
            Shape1.AddWorkLine(Line);


            F_LastLineId++;
            //4
            Line        = new TArrowLine(F_Step, F_LastLineId);
            Line.xStart = P2.X;
            Line.yStart = P2.Y;

            Line.xEnd = tmp_x;
            Line.yEnd = Lnb.yEnd;
            Line.Bend = CalcBend(Line.xStart, Line.xEnd);
            AddLine(Line);
            Shape2.AddWorkLine(Line);


            Shape2.GetTailPoint(0, ref P2);
            F_LastLineId++;
            //5
            Line        = new TArrowLine(F_Step, F_LastLineId);
            Line.xStart = Lnb.xEnd;
            Line.yStart = Lnb.yEnd;

            Line.xEnd = P2.X;
            Line.yEnd = P2.Y;
            Line.Bend = CalcBend(Line.xStart, Line.xEnd);
            AddLine(Line);
            Shape2.AddWorkLine(Line);


            F_LastLineId++;
            //6
            Lnb = (TArrowLine)(GetWorkLine(2));

            Line            = new TArrowLine(F_Step, F_LastLineId);
            Line.PointStart = Lnb.PointEnd;
            Line.xEnd       = Lnb.PointEnd.X + 2 * F_Step;
            Line.yEnd       = Lnb.PointEnd.Y;
            AddLine(Line);
            Shape2.AddWorkLine(Line);
        }