servicepoint/crates/servicepoint_binding_uniffi/libraries/csharp/ServicePoint.Example/Program.cs
Vinzenz Schroeter 960f12ebc5 make BitVec type alias pub, uniffi bitvec
original c# example equivalent works

add uniffi bitvec

original c# example now works with a few tweaks via uniffi
2024-11-13 19:59:55 +01:00

20 lines
488 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));
var pixels = Bitmap.NewMaxSized();
for (ulong offset = 0; offset < ulong.MaxValue; 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));
Thread.Sleep(14);
}