summaryrefslogtreecommitdiff
path: root/lib/libgfx/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-08-04 01:46:01 -0400
committerIan Moffett <ian@osmora.org>2025-08-04 01:46:01 -0400
commitcf5c010fe47b9df2919ecbf248afe33b37c1263a (patch)
treee0d04d597f23b352bd73f77bff336f4903e0e1f8 /lib/libgfx/include
parent14b9fc0a5f3dfb22adae90dd61961682eaf50931 (diff)
libgfx: draw: Add gfx_get_pix() function
Introduce gfx routine to grab the RGB value of a specific pixel at a specific location on the screen. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/libgfx/include')
-rw-r--r--lib/libgfx/include/libgfx/draw.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libgfx/include/libgfx/draw.h b/lib/libgfx/include/libgfx/draw.h
index 9f56f6c..96fe35a 100644
--- a/lib/libgfx/include/libgfx/draw.h
+++ b/lib/libgfx/include/libgfx/draw.h
@@ -103,6 +103,7 @@ struct gfx_point {
int gfx_draw_shape(struct gfx_ctx *ctx, const struct gfx_shape *shape);
int gfx_plot_point(struct gfx_ctx *ctx, const struct gfx_point *point);
+color_t gfx_get_pix(struct gfx_ctx *ctx, uint32_t x, uint32_t y);
__always_inline static inline size_t
gfx_io_index(struct gfx_ctx *ctx, scrpos_t x, scrpos_t y)