2024-05-25 11:16:37 +02:00
|
|
|
|
using ServicePoint;
|
|
|
|
|
using CompressionCode = ServicePoint.BindGen.CompressionCode;
|
2024-05-13 00:17:40 +02:00
|
|
|
|
|
|
|
|
|
using var connection = Connection.Open("127.0.0.1:2342");
|
|
|
|
|
|
2024-05-15 20:34:51 +02:00
|
|
|
|
connection.Send(Command.Clear().IntoPacket());
|
|
|
|
|
connection.Send(Command.Brightness(128).IntoPacket());
|
2024-05-13 00:17:40 +02:00
|
|
|
|
|
2024-10-14 22:42:45 +02:00
|
|
|
|
using var pixels = Bitmap.New(Constants.PixelWidth, Constants.PixelHeight);
|
2024-05-13 00:17:40 +02:00
|
|
|
|
|
2024-10-16 20:56:55 +02:00
|
|
|
|
for (nuint offset = 0; offset < nuint.MaxValue; offset++)
|
2024-05-13 00:17:40 +02:00
|
|
|
|
{
|
|
|
|
|
pixels.Fill(false);
|
|
|
|
|
|
2024-10-16 20:56:55 +02:00
|
|
|
|
for (nuint y = 0; y < pixels.Height; y++)
|
2024-05-13 00:17:40 +02:00
|
|
|
|
pixels[(y + offset) % Constants.PixelWidth, y] = true;
|
|
|
|
|
|
2024-05-16 23:12:03 +02:00
|
|
|
|
connection.Send(Command.BitmapLinearWin(0, 0, pixels.Clone(), CompressionCode.Lzma).IntoPacket());
|
2024-05-13 00:17:40 +02:00
|
|
|
|
Thread.Sleep(14);
|
|
|
|
|
}
|