Matrix Pixel Fix

This commit is contained in:
Serge
2024-01-27 21:43:06 +01:00
parent 8c5f4aa0f3
commit ca8531cf26

View File

@@ -278,7 +278,7 @@ namespace Starlight.AnimeMatrix
if (x >= FirstX(y) && x < Width()) if (x >= FirstX(y) && x < Width())
SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x, value); SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x, value);
} }
public void SetLedDiagonal(int x, int y, byte color, int deltaX = 0, int deltaY = 0) public void SetLedDiagonal(int x, int y, byte color, int deltaX = 0, int deltaY = 0)
{ {
@@ -287,6 +287,9 @@ namespace Starlight.AnimeMatrix
int plX = (x - y) / 2; int plX = (x - y) / 2;
int plY = x + y; int plY = x + y;
if (x - y == -1) plX = -1;
SetLedPlanar(plX, plY, color); SetLedPlanar(plX, plY, color);
} }