25 lines
624 B
C#
25 lines
624 B
C#
namespace SoulstormReplayReader.Core.Models;
|
|
|
|
/// <summary>
|
|
/// Native dow rgd image consists of bgra pixels
|
|
/// </summary>
|
|
public sealed class ReplayImage
|
|
{
|
|
public string Name { get; set; }
|
|
public int Width { get; private set; }
|
|
public int Height { get; private set; }
|
|
public ReplayColor[] Bitmap { get; private set; }
|
|
|
|
public void Init(int width, int height)
|
|
{
|
|
Width = width;
|
|
Height = height;
|
|
Bitmap = new ReplayColor[height * width];
|
|
}
|
|
|
|
public Span<ReplayColor> GetLine(int y)
|
|
{
|
|
var start = y * Width;
|
|
return Bitmap.AsSpan(start, Width);
|
|
}
|
|
} |