Beispiel #1
0
 public ActionASTRAArrowLine(gPoint reference, vdLayout layout)
     : base(reference, layout)
 {
     line = new ASTRAArrowLine();
     line.SetUnRegisterDocument(layout.Document);
     line.setDocumentDefaults();
     line.StartPoint = reference;
     line.EndPoint   = reference;
 }
Beispiel #2
0
        public override void MatchProperties(VectorDraw.Professional.vdObjects.vdPrimary _from, VectorDraw.Professional.vdObjects.vdDocument thisdocument)
        {
            base.MatchProperties(_from, thisdocument);
            ASTRAArrowLine from = _from as ASTRAArrowLine;

            if (from == null)
            {
                return;
            }
            StartPoint = from.StartPoint;
            EndPoint   = from.EndPoint;
            arrowSize  = from.arrowSize;
        }
Beispiel #3
0
        public static void CmdArrowLine(vdDocument document)
        {
            gPoint EPT, SPT;

            document.Prompt("Start Point:");
            object ret = document.ActionUtility.getUserPoint();

            document.Prompt(null);
            if (ret == null || !(ret is gPoint))
            {
                return;
            }
            SPT = ret as gPoint;

            ActionASTRAArrowLine aFig = new ActionASTRAArrowLine(SPT, document.ActiveLayOut);

            document.Prompt("End Point :");

            document.ActionAdd(aFig);
            StatusCode scode = aFig.WaitToFinish();

            document.Prompt(null);
            if (scode != VectorDraw.Actions.StatusCode.Success)
            {
                return;
            }

            EPT = aFig.Value as gPoint;

            ASTRAArrowLine line = new ASTRAArrowLine();

            document.ActionLayout.Entities.AddItem(line);
            document.UndoHistory.PushEnable(false);
            line.InitializeProperties();
            line.setDocumentDefaults();
            line.StartPoint = SPT;
            line.EndPoint   = EPT;
            line.Transformby(document.User2WorldMatrix);
            document.UndoHistory.PopEnable();
            document.ActionDrawFigure(line);
        }