Ejemplo n.º 1
0
        private void Editor_CursorMove(object sender, CursorEventArgs e)
        {
            // check snap mode
            Editor.SnapPoints.Clear();
            if (Editor.Document.Settings.Snap)
            {
                SnapPointType snapMode = Editor.SnapMode;
                float         snapDist = Editor.Document.ActiveView.ScreenToWorld(new Vector2D(Editor.Document.Settings.SnapDistance, 0)).X;
                foreach (Drawable item in Editor.Document.Model)
                {
                    if (item.Visible && (item.Layer == null || item.Layer.Visible))
                    {
                        Editor.SnapPoints.AddFromDrawable(item, e.Location, snapMode, snapDist);
                    }
                }
            }

            CoordsChanged(e.Location);
        }
Ejemplo n.º 2
0
 public SnapPoint(string name, SnapPointType type, Point2D location)
 {
     Name     = name;
     Type     = type;
     Location = location;
 }