servicepoint-binding-csharp/ServicePoint.Example/Program.cs
Vinzenz Schroeter 13a34e83d7
Some checks failed
Rust / build (pull_request) Failing after 18s
update to wip uniffi binding
2025-06-13 11:48:40 +02:00

22 lines
584 B
C#

using System.Threading;
using ServicePoint;
var connection = new Connection("127.0.0.1:2342");
connection.Send(Command.Clear());
connection.Send(Command.Brightness(5));
connection.Send(Command.Utf8Data(0,0, CharGrid.Load("This is a test")));
var pixels = Bitmap.NewMaxSized();
for (ulong offset = 0; offset < pixels.Width(); offset++)
{
pixels.Fill(false);
for (ulong y = 0; y < pixels.Height(); y++)
pixels.Set((y + offset) % pixels.Width(), y, true);
connection.Send(Command.BitmapLinearWin(0, 0, pixels, CompressionCode.Lzma));
Thread.Sleep(14);
}