/// <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; }
/// <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()); }
/// <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()); }
/// <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()); }
/// <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; }
/// <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; }