private void OnPaintCanvas(object sender, SKPaintSurfaceEventArgs e) { SKDevicePainter painter = new SKDevicePainter(e.Surface.Canvas); KDeviceHandler.Draw(painter, 0, 0, e.Info.Width, e.Info.Height); data.DisplayTouchLocation(painter); }
// Implement this to draw on the canvas. public override void DrawRect(CGRect dirtyRect) { base.DrawRect(dirtyRect); var context = NSGraphicsContext.CurrentContext.CGContext; CG.FlipCoordinateSystem(context); KDeviceHandler.Draw(new CGDevicePainter(context), 0, 0, (int)dirtyRect.Width, (int)dirtyRect.Height); }
// Implement this to draw on the canvas. protected override void OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs e) { base.OnPaintSurface(e); KDeviceHandler.Draw(new SKDevicePainter(e.Surface.Canvas), Location.X, Location.Y, e.Info.Width, e.Info.Height); }