private void OnPaintCanvas(object sender, SKPaintSurfaceEventArgs e) { Painter painter = new SKPainter(e.Surface.Canvas); KScoreHandler.Draw(painter, 0, 0, e.Info.Width, e.Info.Height, forcePacked: false); // forcePacked is no longer used since we added a button to switch packing also on iOS/Android 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); KScoreHandler.Draw(new CGPainter(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); KScoreHandler.Draw(new SKPainter(e.Surface.Canvas), Location.X, Location.Y, e.Info.Width, e.Info.Height); }