mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
22 lines
618 B
C#
22 lines
618 B
C#
using SkiaSharp;
|
|
|
|
namespace Artemis.Core;
|
|
|
|
/// <summary>
|
|
/// A static class providing <see cref="SKPaint" /> extensions
|
|
/// </summary>
|
|
public static class SKPaintExtensions
|
|
{
|
|
/// <summary>
|
|
/// Disposes the paint and its disposable properties such as shaders and filters.
|
|
/// </summary>
|
|
/// <param name="paint">The pain to dispose.</param>
|
|
public static void DisposeSelfAndProperties(this SKPaint paint)
|
|
{
|
|
paint.ImageFilter?.Dispose();
|
|
paint.ColorFilter?.Dispose();
|
|
paint.MaskFilter?.Dispose();
|
|
paint.Shader?.Dispose();
|
|
paint.Dispose();
|
|
}
|
|
} |