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