Class MemoryCanvasFrame<TPixel>
- Namespace
- SixLabors.ImageSharp.Drawing.Processing.Backends
- Assembly
- SixLabors.ImageSharp.Drawing.dll
Canvas frame backed by a Buffer2DRegion<T>.
public sealed class MemoryCanvasFrame<TPixel> : ICanvasFrame<TPixel> where TPixel : unmanaged, IPixel<TPixel>
Type Parameters
TPixelThe pixel format.
- Inheritance
-
MemoryCanvasFrame<TPixel>
- Implements
-
ICanvasFrame<TPixel>
- Inherited Members
Constructors
MemoryCanvasFrame(Buffer2DRegion<TPixel>)
Initializes a new instance of the MemoryCanvasFrame<TPixel> class.
public MemoryCanvasFrame(Buffer2DRegion<TPixel> region)
Parameters
regionBuffer2DRegion<TPixel>The pixel buffer region backing this frame.
Properties
Bounds
Gets the frame bounds in root target coordinates.
public Rectangle Bounds { get; }
Property Value
Methods
TryGetCpuRegion(out Buffer2DRegion<TPixel>)
Attempts to get a CPU-accessible destination region.
public bool TryGetCpuRegion(out Buffer2DRegion<TPixel> region)
Parameters
regionBuffer2DRegion<TPixel>The CPU region when available.
Returns
TryGetNativeSurface(out NativeSurface?)
Attempts to get an opaque native destination surface.
public bool TryGetNativeSurface(out NativeSurface? surface)
Parameters
surfaceNativeSurfaceThe native surface when available.