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, }); }
public void MoveTo(Point location) { Center = location; }
public GripAnnot(Point center) { Center = center; }
public GripAnnot(Point center, float size) : this(center) { Size = size; }
public void MoveBy(int diffX, int diffY) { Center = new Point(Center.X + diffX, Center.Y + diffY); }
public static Xna.Vector2 ToXnaVector2(this TF.Point point) { return(new Xna.Vector2(point.X, point.Y)); }
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) { }
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; }
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)); }