From 705e8c7d779e73467778c3a78524bbbba04d886b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Sat, 25 Jan 2025 21:14:52 +0100 Subject: [PATCH] setPixel with 'double'-coordinates --- src/patrix/display/Display.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/patrix/display/Display.h b/src/patrix/display/Display.h index 55848ee..6d6f478 100644 --- a/src/patrix/display/Display.h +++ b/src/patrix/display/Display.h @@ -89,6 +89,10 @@ public: fillRect(0, 0, width, height, Black); } + void setPixel(const double x, const double y, const RGBA color) { + setPixel(static_cast(round(x)), static_cast(round(y)), color); + } + void setPixel(const int x, const int y, const RGBA color) { if (x < 0 || x >= width || y < 0 || y >= height) { return;