Example #1
0
        public SimpleCAD()
        {
            OnUpdatePlotHandler += OnUpdatePlot;

            m_axes = new CoordinateAxes(this);
            AddVisualChild(m_axes);
            AddLogicalChild(m_axes);
            m_axes.Draw();

            this.Loaded += SimpleCAD_Loaded;
        }
Example #2
0
        public void InitialiseDrawing()
        {
            if (Drawing == null)
            {
                return;
            }



            m_axes = new CoordinateAxes();
            AddVisualChild(m_axes);
            AddLogicalChild(m_axes);

            GridLayerVisual = new GridLayerVisual(Drawing);
            AddVisualChild((Visual)GridLayerVisual);
            AddLogicalChild((Visual)GridLayerVisual);

            CursorVisual = new CADCursorVisual(Drawing);
            AddVisualChild((Visual)CursorVisual);
            AddLogicalChild((Visual)CursorVisual);

            SelectionBoxVisual = new SelectBoxVisual(Drawing);
            AddVisual(SelectionBoxVisual);

            //Set Drawing properties from Canvas
            Drawing.Canvas          = this;
            Drawing.AxesColor       = CanvasPalette.ConvertToCAD(AxesColor);
            Drawing.AxesLength      = AxesLength;
            Drawing.AxesTextSize    = AxesTextSize;
            Drawing.AxesThickness   = AxesThickness;
            Drawing.Scale           = Scale;
            Drawing.Axes            = m_axes;
            Drawing.GridLayer.Color = CanvasPalette.ConvertToCAD(GridColor);

            _initialiseDrawing = true;
        }