Ejemplo n.º 1
0
        override public void Init()
        {
            Point P1 = new Point(), P2 = new Point();

            FreeWorkLines();
            FreeWorkShapes();
            TTfeRectShape  Rct;
            TTfeRhombShape Rhomb;

            F_LastShapeId = F_NumberShapeId;
            P1.X          = StartPoint.X + 2 * F_Step;
            P1.Y          = StartPoint.Y;

            F_LastShapeId++;
            F_NumberShapeId = F_LastShapeId;
            Rhomb           = new TTfeRhombShape(P1.X, P1.Y, F_Step, F_LastShapeId + 1);
            Rhomb.TailLeft  = true;
            Rhomb.TailTop   = true;
            Rhomb.TailRight = true;
            AddShape(Rhomb);

            Rhomb.GetTailPoint(1, ref P1);
            P1.X = P1.X + 4 * F_Step;
            P1.Y = P1.Y - 2 * F_Step;
            F_LastShapeId++;
            Rct = new TTfeRectShape(P1.X, P1.Y, F_Step, F_LastShapeId - 1);
            AddShape(Rct);

            CreateLines();
            F_Indent = FirstLine.xEnd - FirstLine.xStart;
        }
Ejemplo n.º 2
0
        public TBaseShape CloneShape(TBaseShape ADest)
        {
            TBaseShape mShape = null;

            if (ADest == null)
            {
                return(null);
            }
            switch (ADest.TypeShape)
            {
            case 5:
                mShape = new TTfeRectShape(0, 0, 0, 0);
                break;

            case 6:
                mShape = new TTfeRhombShape(0, 0, 0, 0);
                break;

            case 7:
                mShape = new TTfeEllShape(0, 0, 0, 0);
                break;

            case 8:
                mShape = new TTfeHexahedronShape(0, 0, 0, 0);
                break;
            }
            if (mShape == null)
            {
                return(null);
            }
            mShape.Clon = ADest;
            ADest.CopyObject(mShape);
            return(mShape);
        }
Ejemplo n.º 3
0
        override public void Init()
        {
            Point P1 = new Point(), P2 = new Point();
            int   n1, n2, n3;

            FreeWorkLines();
            FreeWorkShapes();
            TTfeRectShape  Rct;
            TTfeRhombShape Rhomb;

            F_LastShapeId = F_NumberShapeId;
            P1.X          = StartPoint.X + 2 * F_Step;
            P1.Y          = StartPoint.Y;

            F_LastShapeId++;
            F_NumberShapeId = F_LastShapeId;
            F_LastShapeId++;
            F_LastShapeId++;
            n3 = F_LastShapeId;
            n2 = n3 - 1;
            n1 = n2 - 1;

            Rhomb            = new TTfeRhombShape(P1.X, P1.Y, F_Step, n3);
            Rhomb.TailLeft   = true;
            Rhomb.TailTop    = true;
            Rhomb.TailBottom = true;
            AddShape(Rhomb);

            Rhomb.GetTailPoint(1, ref P1);
            P1.X = P1.X + 4 * F_Step;
            P1.Y = P1.Y - 2 * F_Step;

            Rct = new TTfeRectShape(P1.X, P1.Y, F_Step, n1);
            AddShape(Rct);

            Rhomb.GetTailPoint(3, ref P1);
            P1.X = P1.X + 4 * F_Step;
            P1.Y = P1.Y + 2 * F_Step;
            Rct  = new TTfeRectShape(P1.X, P1.Y, F_Step, n2);
            AddShape(Rct);
            CreateLines();
            CalcWidthWork();
            F_Indent = FirstLine.xEnd - FirstLine.xStart;
        }