From cf5c010fe47b9df2919ecbf248afe33b37c1263a Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 4 Aug 2025 01:46:01 -0400 Subject: 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 --- lib/libgfx/include/libgfx/draw.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libgfx/include') 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) -- cgit v1.2.3