Пример #1
0
 public void Locate(CoreShape.Point location)
 {
     if (activeShape is IShapePen shapePen)
     {
         shapePen.Locate(location);
     }
     foreach (var shape in shapes)
     {
         shape.IsSelected = shape == activeShape;
     }
 }
Пример #2
0
        public HitResult HitTest(CoreShape.Point currentPoint)
        {
            activeShape = shapePen;
            var hitResult = HitResult.None;

            foreach (var shape in shapes.Reverse())
            {
                hitResult = shape.HitTest(currentPoint);
                if (hitResult is not HitResult.None)
                {
                    activeShape = shape;
                    break;
                }
            }
            return(hitResult);
        }
Пример #3
0
 public void Drag(CoreShape.Point oldPoint, CoreShape.Point currentPoint)
 {
     activeShape?.Drag(oldPoint, currentPoint);
 }