Ejemplo n.º 1
0
        private void AddInvertedLineEllipse(ISheet contentSheet, IBlock contentBlock, IBlock selectedBlock, SheetOptions options, double x, double y, double width, double height)
        {
            // create ellipse
            var ellipse = _blockFactory.CreateEllipse(options.LineThickness / options.Zoom, x, y, width, height, false, ItemColors.Black, ItemColors.Transparent);

            contentBlock.Ellipses.Add(ellipse);
            contentSheet.Add(ellipse);
        }
Ejemplo n.º 2
0
        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);
            TempEllipse         = _blockFactory.CreateEllipse(_state.Options.LineThickness / _state.ZoomController.Zoom, x, y, 0.0, 0.0, false, ArgbColors.Black, ArgbColors.Transparent);
            _state.OverlaySheet.Add(TempEllipse);
            _state.OverlaySheet.Capture();
        }
Ejemplo n.º 3
0
        public void Init(ImmutablePoint p, XPoint start)
        {
            double x = _itemController.Snap(p.X, _state.Options.SnapSize);
            double y = _itemController.Snap(p.Y, _state.Options.SnapSize);

            TempLine = _blockFactory.CreateLine(_state.Options.LineThickness / _state.ZoomController.Zoom, x, y, x, y, ArgbColors.Black);

            if (start != null)
            {
                TempLine.Start = start;
            }

            TempStartEllipse = _blockFactory.CreateEllipse(_state.Options.LineThickness / _state.ZoomController.Zoom, x - 4.0, y - 4.0, 8.0, 8.0, true, ArgbColors.Black, ArgbColors.Black);
            TempEndEllipse   = _blockFactory.CreateEllipse(_state.Options.LineThickness / _state.ZoomController.Zoom, x - 4.0, y - 4.0, 8.0, 8.0, true, ArgbColors.Black, ArgbColors.Black);

            _state.OverlaySheet.Add(TempLine);
            _state.OverlaySheet.Add(TempStartEllipse);
            _state.OverlaySheet.Add(TempEndEllipse);
            _state.OverlaySheet.Capture();
        }
Ejemplo n.º 4
0
        public XEllipse Deserialize(ISheet sheet, XBlock parent, ItemEllipse ellipseItem, double thickness)
        {
            var ellipse = _blockFactory.CreateEllipse(thickness,
                                                      ellipseItem.X,
                                                      ellipseItem.Y,
                                                      ellipseItem.Width,
                                                      ellipseItem.Height,
                                                      ellipseItem.IsFilled,
                                                      ellipseItem.Stroke,
                                                      ellipseItem.Fill);

            ellipse.Id = ellipseItem.Id;

            parent.Ellipses.Add(ellipse);
            sheet.Add(ellipse);

            return(ellipse);
        }