SKGLView.PaintSurface Événement
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Se produit lorsque la surface doit être redessinée.
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 ();
};
Il existe deux façons de dessiner sur cette surface : en remplaçant la OnPaintSurface(SKPaintGLSurfaceEventArgs) méthode ou en attachant un gestionnaire à l’événement PaintSurface .
Note
Si une version de SkiaSharp antérieure à la version v1.68.x est utilisée, la DrawInSurface(SKSurface, GRBackendRenderTargetDesc) méthode doit être remplacée au lieu de OnPaintSurface(SKPaintGLSurfaceEventArgs).
Produit | Versions |
---|---|
SkiaSharp Views | 1.60.x, 1.68.x, 2.80.x, 2.88.x |
Commentaires sur SkiaSharp
SkiaSharp est un projet open source. Sélectionnez un lien pour fournir des commentaires: