Пример #1
0
        protected void DrawGraphicItem(NVCO.LineSegment lineSegment)
        {
            Line aLine = new Line();

            aLine.X1 = lineSegment.Origin.x;
            aLine.Y1 = lineSegment.Origin.y;
            aLine.X2 = lineSegment.EndPt.x;
            aLine.Y2 = lineSegment.EndPt.y;
            aLine.HorizontalAlignment = HorizontalAlignment.Left;
            aLine.VerticalAlignment   = VerticalAlignment.Bottom;
            setSymbologyNonText(aLine, lineSegment);
            //aLine.ToolTip = lineSegment.GetToolTip();
            aLine.RenderTransform = xformGroup_all;

            this.Children.Add(aLine);
        }
Пример #2
0
        internal List<Graphic> GetGraphics()
        {
            if (null == dxf) throw new Exception("Dxf file has not been set.");
             List<Graphic> graphicsList = new List<Graphic>();

             foreach (var dxfArc in dxf.Arcs)
             {
            Arc arc = new Arc(dxfArc);
            graphicsList.Add(arc);
             }

             foreach (var dxfLine in dxf.Lines)
             {
            LineSegment lineSegment = new LineSegment(dxfLine);
            graphicsList.Add(lineSegment);
             }

             //foreach (var dxfTxt in dxf.Texts)
             //{
             //   NVcad.CadObjects.Text txt = new NVcad.CadObjects.Text(dxfTxt);
             //   graphicsList.Add(txt);
             //}

             //foreach (var dxfTxt in dxf.MTexts)
             //{
             //   NVcad.CadObjects.Text txt = new NVcad.CadObjects.Text(dxfTxt);
             //   graphicsList.Add(txt);
             //}

             return graphicsList;
        }