diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-08-06 06:23:25 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-08-06 06:23:25 +0200 |
commit | 9bf41b7c331a95477d8a4c095b7802f7a2f8d913 (patch) | |
tree | d5151cd3f477556543b368ac76df313bc736dac6 /src/framebuffer.h | |
parent | doc (diff) | |
download | crt-calibrator-9bf41b7c331a95477d8a4c095b7802f7a2f8d913.tar.gz crt-calibrator-9bf41b7c331a95477d8a4c095b7802f7a2f8d913.tar.bz2 crt-calibrator-9bf41b7c331a95477d8a4c095b7802f7a2f8d913.tar.xz |
framebuffer.c: line drawing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/framebuffer.h')
-rw-r--r-- | src/framebuffer.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/framebuffer.h b/src/framebuffer.h index 701ccea..7ef1fed 100644 --- a/src/framebuffer.h +++ b/src/framebuffer.h @@ -108,6 +108,30 @@ uint32_t fb_colour(int red, int green, int blue); void fb_fill_rectangle(framebuffer_t* restrict fb, uint32_t colour, uint32_t x, uint32_t y, uint32_t width, uint32_t height); +/** + * Draw a horizontal line segment on 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 line segment + * @param y The starting pixel on the Y axis for the line segment + * @param length The length of the line segment, in pixels + */ +void fb_draw_horizontal_line(framebuffer_t* restrict fb, uint32_t colour, + uint32_t x, uint32_t y, uint32_t length); + +/** + * Draw a vertical line segment on 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 line segment + * @param y The starting pixel on the Y axis for the line segment + * @param length The length of the line segment, in pixels + */ +void fb_draw_vertical_line(framebuffer_t* restrict fb, uint32_t colour, + uint32_t x, uint32_t y, uint32_t length); + #endif |