Exemplo n.º 1
0
        private void StartEraseAreaSequence(PointerEventInfo info, ILevelGeometry viewport)
        {
            HidePreviewMarker();

            TileCoord location = TileLocation(info);

            int x = (int)(location.X * Layer.TileWidth);
            int y = (int)(location.Y * Layer.TileHeight);

            _band = new RubberBand(new Point(location.X, location.Y));
            _selection = new SelectionAnnot(new Point(x, y))
            {
                Fill = new SolidColorBrush(new Color(192, 0, 0, 128)),
                //Outline = new Pen(new SolidColorBrush(new Color(192, 0, 0, 200))),
            };

            _annots.Add(_selection);
            _inAreaSequence = true;

            StartAutoScroll(info, viewport);
        }
Exemplo n.º 2
0
            public override ToolState StartPointerSequence(PointerEventInfo info, ILevelGeometry viewport)
            {
                Band = new RubberBand(new Point((int)info.X, (int)info.Y));
                Annot = new SelectionAnnot(new Point((int)info.X, (int)info.Y)) {
                    Fill = SelectionAnnotFill,
                    Outline = SelectionAnnotOutline,
                };

                Tool._annots.Add(Annot);
                Tool.StartAutoScroll(info, viewport);

                return this;
            }
Exemplo n.º 3
0
        private void StartDrag(PointerEventInfo info, ILevelGeometry viewport)
        {
            ClearPreviewMarker();
            _activeBrush = null;

            TileCoord location = TileLocation(info);

            int x = (int)(location.X * Layer.TileWidth);
            int y = (int)(location.Y * Layer.TileHeight);

            _band = new RubberBand(new Point(location.X, location.Y));
            _selectionAnnot = new SelectionAnnot(new Point((int)info.X, (int)info.Y)) {
                Fill = new SolidColorBrush(new Color(76, 178, 255, 128)),
            };

            _annots.Add(_selectionAnnot);

            //StartAutoScroll(info, viewport);
        }
Exemplo n.º 4
0
        private void StartDrag(PointerEventInfo info, ILevelGeometry viewport, MergeAction action)
        {
            TileCoord location = TileLocation(info);

            int x = (int)(location.X * Layer.TileWidth);
            int y = (int)(location.Y * Layer.TileHeight);

            _band = new RubberBand(new Point(location.X, location.Y));
            _selectionAnnot = new SelectionAnnot(new Point((int)info.X, (int)info.Y))
            {
                Fill = new SolidColorBrush(new Color(76, 178, 255, 128)),
            };

            _annots.Add(_selectionAnnot);
            _action = UpdateAction.Box;
            _mergeAction = action;

            StartAutoScroll(info, viewport);
        }