public void Connect(IGraphicsView graphicsView) { _graphicsView = graphicsView; _gestureLayer = new GestureLayer(this); _gestureLayer.Attach(this); _gestureLayer.SetTapCallback(GestureLayer.GestureType.Tap, GestureLayer.GestureState.Start, (_) => { OnGestureStarted(); }); _gestureLayer.SetTapCallback(GestureLayer.GestureType.Tap, GestureLayer.GestureState.End, (_) => { OnGestureEnded(true); }); _gestureLayer.SetLineCallback(GestureLayer.GestureState.Start, (_) => { OnGestureStarted(); }); _gestureLayer.SetLineCallback(GestureLayer.GestureState.Move, (_) => { _graphicsView?.DragInteraction(new[] { _gestureLayer.EvasCanvas.Pointer.ToPointF() }); }); _gestureLayer.SetLineCallback(GestureLayer.GestureState.End, (_) => { OnGestureEnded(Geometry.ToDP().Contains(_gestureLayer.EvasCanvas.Pointer.ToPoint())); }); _gestureLayer.SetLineCallback(GestureLayer.GestureState.Abort, (_) => { _graphicsView?.CancelInteraction(); }); }
public void Connect(IGraphicsView graphicsView) { this.graphicsView = graphicsView; if (OperatingSystem.IsIOSVersionAtLeast(13)) { AddGestureRecognizer(hoverGesture = new UIHoverGestureRecognizer(OnHover)); } }
Task ValidateHasColor(IGraphicsView graphicsView, Color color, Action action = null) { return(InvokeOnMainThreadAsync(() => { var PlatformGraphicsView = GetPlatformGraphicsView(CreateHandler(graphicsView)); action?.Invoke(); PlatformGraphicsView.AssertContainsColor(color); })); }
public void InitializeGraphics(IGraphicsView view, IInputWatcher input) { Configuration.GraphicsView = view; Configuration.InputWatcher = input; }
public static void UpdateDrawable(this W2DGraphicsView PlatformGraphicsView, IGraphicsView graphicsView) { PlatformGraphicsView.Drawable = graphicsView.Drawable; }
public void Connect(IGraphicsView graphicsView) => _graphicsView = graphicsView;
public void UpdateDrawable(IGraphicsView graphicsView) { _platformGraphicsView.UpdateDrawable(graphicsView); _graphicsView = graphicsView; }
public static void UpdateDrawable(this W2DGraphicsView nativeGraphicsView, IGraphicsView graphicsView) { nativeGraphicsView.Drawable = graphicsView.Drawable; }
public static void UpdateDrawable(this SkiaGraphicsView platformGraphicsView, IGraphicsView graphicsView) { platformGraphicsView.Drawable = graphicsView.Drawable; }
public void Connect(IGraphicsView graphicsView) { this.graphicsView = graphicsView; AddGestureRecognizer(hoverGesture = new UIHoverGestureRecognizer(OnHover)); }