From 5bf9444c01141834063587b42afdcb2580e647ec Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 1 Jun 2024 21:21:26 -0700 Subject: [PATCH] Fix offset for Fill method --- Source/LedMatrix8x16Wing/Driver/LedMatrix8x16Wing.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/LedMatrix8x16Wing/Driver/LedMatrix8x16Wing.cs b/Source/LedMatrix8x16Wing/Driver/LedMatrix8x16Wing.cs index 34f5073..15452f1 100644 --- a/Source/LedMatrix8x16Wing/Driver/LedMatrix8x16Wing.cs +++ b/Source/LedMatrix8x16Wing/Driver/LedMatrix8x16Wing.cs @@ -156,7 +156,10 @@ public void Fill(Color fillColor, bool updateDisplay = false) { Fill(0, 0, Width, Height, fillColor); - if (updateDisplay) Show(); + if (updateDisplay) + { + Show(); + } } /// @@ -174,7 +177,7 @@ public void Fill(int x, int y, int width, int height, Color fillColor) { for (int j = 0; j < height; j++) { - DrawPixel(i, j, isColored); + DrawPixel(x + i, y + j, isColored); } } }