Leer en inglés Editar

Compartir a través de


SKAutoMaskFreeImage Class

Definition

Convenience class used to automatically free the image data for a mask in a using statement.

C#
public class SKAutoMaskFreeImage : IDisposable
Inheritance
SKAutoMaskFreeImage
Implements

Examples

C#
// some buffer
byte[] buffer = ...;

// create the mask, allocating the image
var mask = SKMask.Create(buffer, bounds, rowBytes, format);
using (new SKAutoMaskFreeImage(mask.Image)) {
    // use the mask

    // automatically release the image data
}

Remarks

This class can be used in a using statement to automatically free the image data of a mask by virtue of having the Dispose() method.

Constructors

SKAutoMaskFreeImage(IntPtr)

Create a new instance of SKAutoMaskFreeImage with the specified image to free.

Methods

Dispose()

Disposes the object, releasing the image data.

Applies to

Producto Versiones
SkiaSharp 1.60.x, 1.68.x, 2.80.x, 2.88.x