示例#1
0
 /// <summary>
 /// Initializes a new instance of the MapAround.UI.WinForms.SnapInfo
 /// which describes a snapping by the custom method.
 /// </summary>
 public Snapper(IEnumerable<ICoordinate> points, SnapMethodDelegate snapMethod)
 {
     _snapType = SnapType.PointsAndSegments;
     _snapMethod = snapMethod;
 }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the MapAround.UI.WinForms.SnapInfo
        /// which describes a snapping to the points and the segments.
        /// </summary>
        public Snapper(IEnumerable<ICoordinate> points, IEnumerable<Segment> segments)
        {
            _snapType = SnapType.PointsAndSegments;
            _snapMethod = this.pointsAndSegmentsSnapMethod;

            foreach (ICoordinate c in points)
                _points.Add((ICoordinate)c.Clone());

            foreach (Segment s in segments)
                _segments.Add((Segment)s.Clone());
        }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the MapAround.UI.WinForms.SnapInfo
        /// which describes a snapping to the segments.
        /// </summary>
        public Snapper(IEnumerable<Segment> segments)
        {
            _snapType = SnapType.Segments;
            _snapMethod = this.segmentsSnapMethod;

            foreach (Segment s in segments)
                _segments.Add((Segment)s.Clone());
        }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the MapAround.UI.WinForms.SnapInfo
        /// which describes a snapping to the points.
        /// </summary>
        public Snapper(IEnumerable<ICoordinate> points)
        {
            _snapType = SnapType.Points;
            _snapMethod = this.pointsSnapMethod;

            foreach(ICoordinate c in points)
                _points.Add((ICoordinate)c.Clone());
        }
示例#5
0
        /// <summary>
        /// Initializes a new instance of the MapAround.UI.WinForms.SnapInfo
        /// which describes a snapping to the regular grid.
        /// </summary>
        public Snapper(ICoordinate gridOrigin, double gridCellSize)
        {
            _snapType = SnapType.Grid;
            _snapMethod = this.gridSnapMethod;

            _gridCellSize = gridCellSize;
            _gridOrigin = gridOrigin;
        }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the MapAround.UI.WinForms.SnapInfo
 /// which describes a no snapping abilities.
 /// </summary>
 public Snapper()
 {
     _snapType = SnapType.None;
     _snapMethod = emptySnapMethod;
 }