public ItemRectangle Serialize(XRectangle rectangle) { return(new ItemRectangle() { Id = rectangle.Id, X = _blockHelper.GetLeft(rectangle), Y = _blockHelper.GetTop(rectangle), Width = _blockHelper.GetWidth(rectangle), Height = _blockHelper.GetHeight(rectangle), IsFilled = _blockHelper.IsTransparent(rectangle), Stroke = _blockHelper.GetStroke(rectangle), Fill = _blockHelper.GetFill(rectangle) }); }
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; } }