gView.Plugins.MapTools.Graphics.Freehand.AddPoint C# (CSharp) 메소드

AddPoint() 개인적인 메소드

private AddPoint ( double x, double y ) : void
x double
y double
리턴 void
        private void AddPoint(double x, double y)
        {
            if (_pLine == null)
            {
                _pLine = new Polyline();
                Path path = new Path();
                _pLine.AddPath(path);
            }
            _pLine[0].AddPoint(new Point(x, y));
        }

Usage Example

예제 #1
0
        public void ConstructMouseDown(IMapDocument doc, System.Windows.Forms.MouseEventArgs e)
        {
            if (ActiveDisplay(doc) == null)
            {
                return;
            }

            Freehand element = new Freehand();

            _addContainer = new GraphicsContainer();
            _addContainer.Elements.Add(element);

            _mousePressed = true;
            double x = e.X;
            double y = e.Y;
            ActiveDisplay(doc).Image2World(ref x, ref y);

            element.AddPoint(x, y);
        }