public ItemPoint Serialize(XPoint point) { return(new ItemPoint() { Id = point.Id, X = _blockHelper.GetLeft(point), Y = _blockHelper.GetTop(point) }); }
public void MoveDelta(double dx, double dy, XPoint point) { if (point.Native != null) { point.X = _blockHelper.GetLeft(point) + dx; point.Y = _blockHelper.GetTop(point) + dy; _blockHelper.SetLeft(point, point.X); _blockHelper.SetTop(point, point.Y); } else { point.X += dx; point.Y += dy; } foreach (var dependency in point.Connected) { dependency.Update(dependency.Element, point); } }
public void Finish() { double x = _blockHelper.GetLeft(TempEllipse); double y = _blockHelper.GetTop(TempEllipse); double width = _blockHelper.GetWidth(TempEllipse); double height = _blockHelper.GetHeight(TempEllipse); if (width == 0.0 || height == 0.0) { Cancel(); } else { _state.OverlaySheet.ReleaseCapture(); _state.OverlaySheet.Remove(TempEllipse); _state.HistoryController.Register("Create Ellipse"); _state.ContentBlock.Ellipses.Add(TempEllipse); _state.ContentSheet.Add(TempEllipse); TempEllipse = null; } }