Delegate RowAction<TPixel>
- Namespace
- Egami
- Assembly
- Egami.dll
Processes one row of pixels.
public delegate void RowAction<TPixel>(Span<TPixel> row, int y) where TPixel : unmanaged, IPixelType<TPixel>
Parameters
Type Parameters
TPixelThe pixel type.
Examples
using Raster<Rgba8> image = Raster.Create<Rgba8>(256, 64);
// A horizontal gradient; rows run in parallel, each row is a Span over the pixels.
image.ForEachRow((row, y) =>
{
for (int x = 0; x < row.Length; x++)
{
row[x] = new Rgba8((byte)x, (byte)(y * 4), 128, 255);
}
});