public void Locate(CoreShape.Point location) { if (activeShape is IShapePen shapePen) { shapePen.Locate(location); } foreach (var shape in shapes) { shape.IsSelected = shape == activeShape; } }
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); }
public void Drag(CoreShape.Point oldPoint, CoreShape.Point currentPoint) { activeShape?.Drag(oldPoint, currentPoint); }