aboutsummaryrefslogtreecommitdiffstats
path: root/src/framebuffer.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-06 06:10:46 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-06 06:10:46 +0200
commit0c3e33c7bf1060972a79bb5a22cdedfebc316a11 (patch)
tree2d2bcefa3c85b596287ddfcc2c1f40894c2f66d3 /src/framebuffer.h
parentdrawing to the framebuffer (diff)
downloadcrt-calibrator-0c3e33c7bf1060972a79bb5a22cdedfebc316a11.tar.gz
crt-calibrator-0c3e33c7bf1060972a79bb5a22cdedfebc316a11.tar.bz2
crt-calibrator-0c3e33c7bf1060972a79bb5a22cdedfebc316a11.tar.xz
doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
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);