aboutsummaryrefslogtreecommitdiffstats
path: root/src/framebuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/framebuffer.h')
-rw-r--r--src/framebuffer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/framebuffer.h b/src/framebuffer.h
index 1dffb82..701ccea 100644
--- a/src/framebuffer.h
+++ b/src/framebuffer.h
@@ -84,8 +84,27 @@ int fb_open(size_t index, framebuffer_t* restrict fb);
*/
void fb_close(framebuffer_t* restrict fb);
+/**
+ * Construct an sRGB colour in 32-bit XRGB encoding to
+ * use when specifying colours
+ *
+ * @param red The red component from [0, 255] sRGB
+ * @param green The green component from [0, 255] sRGB
+ * @param blue The blue component from [0, 255] sRGB
+ * @return The colour as one 32-bit integer
+ */
uint32_t fb_colour(int red, int green, int blue);
+/**
+ * Print a filled in rectangle to a framebuffer
+ *
+ * @param fb The framebuffer
+ * @param colour The colour to use when drawing the rectangle
+ * @param x The starting pixel on the X axis for the rectangle
+ * @param y The starting pixel on the Y axis for the rectangle
+ * @param width The width of the rectangle, in pixels
+ * @param height The height of the rectangle, in pixels
+ */
void fb_fill_rectangle(framebuffer_t* restrict fb, uint32_t colour,
uint32_t x, uint32_t y, uint32_t width, uint32_t height);