SKGLView.PaintSurface Event
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the surface needs to be redrawn.
public event EventHandler<SkiaSharp.Views.tvOS.SKPaintGLSurfaceEventArgs> PaintSurface;
myView.PaintSurface += (sender, e) => {
var surface = e.Surface;
var surfaceWidth = e.BackendRenderTarget.Width;
var surfaceHeight = e.BackendRenderTarget.Height;
var canvas = surface.Canvas;
// draw on the canvas
canvas.Flush ();
};
There are two ways to draw on this surface: by overriding the OnPaintSurface(SKPaintGLSurfaceEventArgs) method, or by attaching a handler to the PaintSurface event.
Bilješka
If a version of SkiaSharp prior to version v1.68.x is being used, then the DrawInSurface(SKSurface, GRBackendRenderTargetDesc) method should be overridden instead of OnPaintSurface(SKPaintGLSurfaceEventArgs).
Proizvod | Verzije |
---|---|
SkiaSharp Views | 1.60.x, 1.68.x, 2.80.x, 2.88.x |
SkiaSharp povratne informacije
SkiaSharp je projekat otvorenog koda. Odaberite vezu za pružanje povratnih informacija: