// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System.Diagnostics.CodeAnalysis;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Drawing.Processing.Backends {
///
/// Per-frame destination for .
///
/// The pixel format.
public interface ICanvasFrame
where TPixel : unmanaged, IPixel
{
///
/// Gets the frame bounds in root target coordinates.
///
public Rectangle Bounds { get; }
///
/// Attempts to get a CPU-accessible destination region.
///
/// The CPU region when available.
/// when a CPU region is available.
public bool TryGetCpuRegion(out Buffer2DRegion region);
///
/// Attempts to get an opaque native destination surface.
///
/// The native surface when available.
/// when a native surface is available.
public bool TryGetNativeSurface([NotNullWhen(true)] out NativeSurface? surface);
}
}