update language bindings and examples

This commit is contained in:
Vinzenz Schroeter 2024-05-16 23:12:03 +02:00
parent 862804de3b
commit 95928ee85c
4 changed files with 8 additions and 6 deletions

View file

@ -9,7 +9,7 @@ int main(void) {
sp2_PixelGrid *pixels = sp2_pixel_grid_new(sp2_PIXEL_WIDTH, sp2_PIXEL_HEIGHT);
sp2_pixel_grid_fill(pixels, true);
sp2_Command *command = sp2_command_bitmap_linear_win(0, 0, pixels);
sp2_Command *command = sp2_command_bitmap_linear_win(0, 0, pixels, Uncompressed);
sp2_Packet *packet = sp2_packet_from_command(command);
if (!sp2_connection_send(connection, packet))
return 1;

View file

@ -1,4 +1,5 @@
using ServicePoint2;
using CompressionCode = ServicePoint2.BindGen.CompressionCode;
using var connection = Connection.Open("127.0.0.1:2342");
@ -14,6 +15,6 @@ for (var offset = 0; offset < int.MaxValue; offset++)
for (var y = 0; y < pixels.Height; y++)
pixels[(y + offset) % Constants.PixelWidth, y] = true;
connection.Send(Command.BitmapLinearWin(0, 0, pixels.Clone()).IntoPacket());
connection.Send(Command.BitmapLinearWin(0, 0, pixels.Clone(), CompressionCode.Lzma).IntoPacket());
Thread.Sleep(14);
}