public XRectangle CreateSelectionRectangle(double thickness, double x, double y, double width, double height) { var stroke = new ArgbColor(0x7A, 0x00, 0x00, 0xFF); var fill = new ArgbColor(0x3A, 0x00, 0x00, 0xFF); var xrect = _blockFactory.CreateRectangle(thickness, x, y, width, height, true, stroke, fill); return(xrect); }
public void Init(ImmutablePoint p) { double x = _itemController.Snap(p.X, _state.Options.SnapSize); double y = _itemController.Snap(p.Y, _state.Options.SnapSize); SelectionStartPoint = new ImmutablePoint(x, y); TempRectangle = _blockFactory.CreateRectangle(_state.Options.LineThickness / _state.ZoomController.Zoom, x, y, 0.0, 0.0, false, ArgbColors.Black, ArgbColors.Transparent); _state.OverlaySheet.Add(TempRectangle); _state.OverlaySheet.Capture(); }
public XRectangle Deserialize(ISheet sheet, XBlock parent, ItemRectangle rectangleItem, double thickness) { var rectangle = _blockFactory.CreateRectangle(thickness, rectangleItem.X, rectangleItem.Y, rectangleItem.Width, rectangleItem.Height, rectangleItem.IsFilled, rectangleItem.Stroke, rectangleItem.Fill); rectangle.Id = rectangleItem.Id; parent.Rectangles.Add(rectangle); sheet.Add(rectangle); return(rectangle); }