PixelRowSource<TPixel> Struct
- Obsolete: Types with embedded references are not supported in this version of your compiler.
Read-only access to the rows of a frame as they were before a neighborhood operation, valid only during IPixelNeighborhoodOperation<TPixel>.Invoke.
[Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
public readonly ref struct PixelRowSource<TPixel> where TPixel : unmanagedType parameters
TPixel- The pixel type of the rows.
Remarks
The rows are a copy of the frame, so they never show the rows the operation already wrote. Each row contains exactly PixelRowSource<TPixel>.Width pixels; consecutive rows are not guaranteed to be adjacent in memory. A default instance has no rows.
Properties
| Name | Description |
|---|---|
| Height | Gets the number of rows. |
| Width | Gets the number of pixels per row. |
Methods
| Name | Description |
|---|---|
| GetRow(int) | Gets a row. |
| GetRowClamped(int) | Gets a row, the nearest one when the index is outside the frame (the edge rows are repeated). |
GetRow(int)
PixelRowSource{TPixel}.csGets a row.
public ReadOnlySpan<TPixel> GetRow(int y)Parameters
yint- The row index, from 0 to
Height - 1.
Returns
ReadOnlySpan<TPixel> A span of exactly PixelRowSource<TPixel>.Width pixels, valid until the operation returns.
Exceptions
ArgumentOutOfRangeExceptionyis out of range.InvalidOperationException- The operation that received the source has returned.
GetRowClamped(int)
PixelRowSource{TPixel}.csGets a row, the nearest one when the index is outside the frame (the edge rows are repeated).
public ReadOnlySpan<TPixel> GetRowClamped(int y)Parameters
yint- The row index, which may be negative or past the last row.
Returns
ReadOnlySpan<TPixel> A span of exactly PixelRowSource<TPixel>.Width pixels, valid until the operation returns.
Exceptions
InvalidOperationException- The operation that received the source has returned.