public void QueueRotate(ObjectInstance inst, Point oldLocation, Point newLocation, float oldRotation, float newRotation)
 {
     _objects.Add(new ObjectRecord() {
         Instance = inst,
         OldLocation = oldLocation,
         NewLocation = newLocation,
         OldRotation = oldRotation,
         NewRotation = newRotation,
     });
 }
Exemple #2
0
 public void MoveTo(Point location)
 {
     Center = location;
 }
Exemple #3
0
 public GripAnnot(Point center)
 {
     Center = center;
 }
Exemple #4
0
 public GripAnnot(Point center, float size)
     : this(center)
 {
     Size = size;
 }
Exemple #5
0
 public void MoveBy(int diffX, int diffY)
 {
     Center = new Point(Center.X + diffX, Center.Y + diffY);
 }
Exemple #6
0
 public static Xna.Vector2 ToXnaVector2(this TF.Point point)
 {
     return(new Xna.Vector2(point.X, point.Y));
 }
Exemple #7
0
 public static Xna.Point ToXnaPoint(this TF.Point point)
 {
     return(new Xna.Point(point.X, point.Y));
 }
 public void ActivateContextMenu(CommandMenu menu, Treefrog.Framework.Imaging.Point location)
 {
 }
Exemple #9
0
        private void ShowPreviewMarker(PointerEventInfo info)
        {
            if (ActiveObjectClass == null)
                return;

            if (ActiveObjectClass != _activeClass) {
                HidePreviewMarker();
                _previewMarker = null;
                _activeClass = ActiveObjectClass;
            }

            if (!_previewMarkerVisible) {
                if (_previewMarker == null) {
                    _previewMarker = new ImageAnnot() {
                        Image = ActiveObjectClass.Image,
                        BlendColor = new Color(255, 255, 255, 128),
                    };
                }

                _annots.Add(_previewMarker);
                _previewMarkerVisible = true;
            }

            Point xlat = new Point((int)info.X - _activeClass.ImageBounds.Width / 2, (int)info.Y - _activeClass.ImageBounds.Height / 2);
            if (SnapManager != null)
                xlat = SnapManager.Translate(xlat, SnappingTarget);

            _previewMarker.Position = xlat;
        }
Exemple #10
0
        private void StartDrawObjectSequence(PointerEventInfo info)
        {
            if (ActiveObjectClass == null)
                return;

            Point xlat = new Point((int)info.X - _activeClass.ImageBounds.Width / 2, (int)info.Y - _activeClass.ImageBounds.Height / 2);
            if (SnapManager != null)
                xlat = SnapManager.Translate(xlat, SnappingTarget);

            ObjectInstance inst = new ObjectInstance(ActiveObjectClass, xlat.X + ActiveObjectClass.Origin.X, xlat.Y + ActiveObjectClass.Origin.Y);
            History.Execute(new ObjectAddCommand(Layer, inst));
        }