From cc862d29522eeb32be9c9d3000889fd238d02b87 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Sun, 22 Oct 2023 10:46:30 +0200 Subject: [PATCH] - [NEW] draw::putPixel() --- source/jdraw.cpp | 5 +++++ source/jdraw.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/source/jdraw.cpp b/source/jdraw.cpp index 0730729..5d9f880 100644 --- a/source/jdraw.cpp +++ b/source/jdraw.cpp @@ -315,6 +315,11 @@ namespace draw return 0; } + void putPixel(const int x, const int y, const uint8_t color) + { + pset(screen, x, y, color); + } + // Pinta un troç de la superficie "source" en la superficie "destination". void draw(const int dx, const int dy, const int w, const int h, const int sx, const int sy, const int flip) { diff --git a/source/jdraw.h b/source/jdraw.h index 19ac1c8..adb12c8 100644 --- a/source/jdraw.h +++ b/source/jdraw.h @@ -94,6 +94,8 @@ namespace draw /// @param color color a usar com a transparent void setTrans(const uint8_t color); + void putPixel(const int x, const int y, const uint8_t color); + /// @brief Pinta un troç de la superficie "source" en la superficie "destination". /// @param dx coordenada x de la destinació /// @param dy coordenada y de la destinació