Class Buffer2D<T>
- Namespace
- SixLabors.ImageSharp.Memory
- Assembly
- SixLabors.ImageSharp.dll
public sealed class Buffer2D<T> : IDisposable where T : struct
Type Parameters
T
The value type.
- Inheritance
-
Buffer2D<T>
- Implements
- Inherited Members
- Extension Methods
Properties
Height
Gets the height.
public int Height { get; }
Property Value
this[int, int]
Gets a reference to the element at the specified position.
public ref T this[int x, int y] { get; }
Parameters
Property Value
- T
A reference to the element.
Exceptions
- IndexOutOfRangeException
When index is out of range of the buffer.
MemoryGroup
Gets the backing IMemoryGroup<T>.
public IMemoryGroup<T> MemoryGroup { get; }
Property Value
- IMemoryGroup<T>
The MemoryGroup.
Width
Gets the width.
public int Width { get; }
Property Value
Methods
DangerousGetRowSpan(int)
Gets a Span<T> to the row 'y' beginning from the pixel at the first pixel on that row.
public Span<T> DangerousGetRowSpan(int y)
Parameters
y
intThe row index.
Returns
Remarks
This method does not validate the y argument for performance reason, ArgumentOutOfRangeException is being propagated from lower levels.
Exceptions
- ArgumentOutOfRangeException
Thrown when row index is out of range.
Dispose()
Disposes the Buffer2D<T> instance
public void Dispose()