当前位置: 首页>>代码示例>>C#>>正文


C# ILevelGeometry类代码示例

本文整理汇总了C#中ILevelGeometry的典型用法代码示例。如果您正苦于以下问题:C# ILevelGeometry类的具体用法?C# ILevelGeometry怎么用?C# ILevelGeometry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ILevelGeometry类属于命名空间,在下文中一共展示了ILevelGeometry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EndPointerSequenceCore

 protected override void EndPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
 {
     switch (info.Type) {
         case PointerEventType.Primary:
             EndSelectTilesSequence(info, viewport);
             break;
     }
 }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:8,代码来源:TileSelectTool.cs

示例2: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            switch (info.Type) {
                case PointerEventType.Primary:
                    StartFillSequence(info);
                    break;
            }

            UpdatePointerSequence(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:10,代码来源:TileFillTool.cs

示例3: EndPointerSequenceCore

        protected override void EndPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            _state = _state.EndPointerSequence(info, viewport);

            /*switch (info.Type) {
                case PointerEventType.Primary:
                    EndSelectObjectSequence(info, viewport);
                    break;
            }*/
        }
开发者ID:Elof3,项目名称:Treefrog,代码行数:10,代码来源:ObjectSelectTool.cs

示例4: PointerPositionCore

        protected override void PointerPositionCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            TileCoord location = TileLocation(info);
            if (!TileInRange(location) || _inAreaSequence) {
                HidePreviewMarker();
                return;
            }

            ShowPreviewMarker(location);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:10,代码来源:TileEraseTool.cs

示例5: EndPointerSequenceCore

 protected override void EndPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
 {
     switch (info.Type) {
         case PointerEventType.Primary:
             EndErasePathSequence(info);
             break;
         case PointerEventType.Secondary:
             EndEraseAreaSequence(info, viewport);
             break;
     }
 }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:11,代码来源:TileEraseTool.cs

示例6: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            switch (info.Type) {
                case PointerEventType.Primary:
                    StartSelectTilesSequence(info, viewport);
                    break;
                case PointerEventType.Secondary:
                    DefloatSelection();
                    break;
            }

            UpdatePointerSequence(info, viewport);
        }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:13,代码来源:TileSelectTool.cs

示例7: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            switch (info.Type) {
                case PointerEventType.Primary:
                    StartDrawObjectSequence(info);
                    break;
                case PointerEventType.Secondary:
                    Cancel();
                    break;
            }

            UpdatePointerSequence(info, viewport);
        }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:13,代码来源:ObjectDrawTool.cs

示例8: StartPointerSequenceCore

        protected override void StartPointerSequenceCore(PointerEventInfo info, ILevelGeometry viewport)
        {
            _state = _state.StartPointerSequence(info, viewport);

            /*switch (info.Type) {
                case PointerEventType.Primary:
                    StartSelectObjectSequence(info, viewport);
                    break;
                case PointerEventType.Secondary:
                    _selectionManager.ClearSelection();
                    if (_rotationAnnot != null) {
                        _annots.Remove(_rotationAnnot);
                        _rotationAnnot = null;
                    }
                    UpdatePropertyProvider();
                    break;
            }*/

            UpdatePointerSequence(info, viewport);
        }
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:20,代码来源:ObjectSelectTool.cs

示例9: StartEraseAreaSequence

        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);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:21,代码来源:TileEraseTool.cs

示例10: EndEraseAreaSequence

        private void EndEraseAreaSequence(PointerEventInfo info, ILevelGeometry viewport)
        {
            Rectangle selection = _band.Selection;
            int xmin = Math.Max(Layer.TileOriginX, selection.Left);
            int ymin = Math.Max(Layer.TileOriginY, selection.Top);
            int xmax = Math.Min(Layer.TileOriginX + Layer.TilesWide, selection.Right);
            int ymax = Math.Min(Layer.TileOriginY + Layer.TilesHigh, selection.Bottom);

            TileReplace2DCommand command = new TileReplace2DCommand(Layer);
            for (int x = xmin; x < xmax; x++) {
                for (int y = ymin; y < ymax; y++) {
                    command.QueueReplacement(new TileCoord(x, y), (TileStack)null);
                    Layer[new TileCoord(x, y)] = null;
                }
            }

            History.Execute(command);

            _annots.Remove(_selection);
            _inAreaSequence = false;

            EndAutoScroll(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:23,代码来源:TileEraseTool.cs

示例11: StartDrag

 private ToolState StartDrag(PointerEventInfo info, ILevelGeometry viewport)
 {
     Tool._selectionManager.ClearSelection();
     return StartDragAdd(info, viewport);
 }
开发者ID:Elof3,项目名称:Treefrog,代码行数:5,代码来源:ObjectSelectTool.cs

示例12: UpdateDrag

        private void UpdateDrag(PointerEventInfo info, ILevelGeometry viewport)
        {
            TileCoord location = TileLocation(info);

            _band.End = new Point(location.X, location.Y);
            Rectangle selection = _band.Selection;

            _selectionAnnot.Start = new Point(selection.Left * Layer.TileWidth, selection.Top * Layer.TileHeight);
            _selectionAnnot.End = new Point(selection.Right * Layer.TileWidth, selection.Bottom * Layer.TileHeight);

            //UpdateAutoScroll(info, viewport);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:12,代码来源:TileDrawTool.cs

示例13: StartDrag

        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);
        }
开发者ID:jaquadro,项目名称:Treefrog,代码行数:19,代码来源:TileDrawTool.cs

示例14: StartSecondaryPointerSequence

            private ToolState StartSecondaryPointerSequence(PointerEventInfo info, ILevelGeometry viewport)
            {
                ObjectInstance hitObject = Tool.TopObject(Tool.CoarseHitTest((int)info.X, (int)info.Y));
                if (hitObject == null)
                    return new ReleaseToolState(Tool).StartPointerSequence(info, viewport);

                Tool.ActivateObjectMenu(info);

                if (Tool._selectionManager.IsObjectSelected(hitObject))
                    return this;
                else
                    return StartClickNew(info, viewport, hitObject);
            }
开发者ID:Elof3,项目名称:Treefrog,代码行数:13,代码来源:ObjectSelectTool.cs

示例15: StartClickRemove

            private ToolState StartClickRemove(PointerEventInfo info, ILevelGeometry viewport, ObjectInstance obj)
            {
                Tool._selectionManager.RemoveObjectFromSelection(obj);

                Tool.StartAutoScroll(info, viewport);
                Tool.UpdatePropertyProvider();

                return new SelectionStandbyToolState(Tool).StartPointerSequence(info, viewport);
            }
开发者ID:Elof3,项目名称:Treefrog,代码行数:9,代码来源:ObjectSelectTool.cs


注:本文中的ILevelGeometry类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。