|
Man Over Board
|
Provides functions for raster graphics operations. More...
#include "global.h"Enumerations | |
| enum | BitMapDrawMode { SET , UNSET , SWAP } |
| Specifies the mode in which a bitmap should be drawn. More... | |
Functions | |
| void | black_screen (Screen *base) |
| Clears the entire screen by filling it with black. | |
| void | white_screen (Screen *base) |
| Clears the entire screen by filling it with white. | |
| void | set_pixel (Screen *base, u16 x, u16 y, Color color) |
| Sets a pixel at the specified coordinates to a given color. | |
| void | drawBitMap (Screen *base, const BitMap *bitmap, u16 x_offset, u16 y_offset, BitMapDrawMode draw_mode) |
| Draws a bitmap onto the screen at the specified coordinates. | |
| void | drawVerticalLine (Screen *base, u16 x_pos, u16 y_start, u16 y_end) |
| Draws a vertical line on the screen. | |
| void | drawHorizontalLine (Screen *base, u16 y_pos, u16 x_start, u16 x_end, BitMapDrawMode mode) |
| Draws a horizontal line on the screen. | |
Provides functions for raster graphics operations.
This header defines functions for manipulating a screen buffer, including pixel drawing, line drawing, and bitmap rendering.
| enum BitMapDrawMode |
| void black_screen | ( | Screen * | base | ) |
Clears the entire screen by filling it with black.
| base | Pointer to the screen buffer. |
| void drawBitMap | ( | Screen * | base, |
| const BitMap * | bitmap, | ||
| u16 | x_offset, | ||
| u16 | y_offset, | ||
| BitMapDrawMode | draw_mode ) |
Draws a bitmap onto the screen at the specified coordinates.
| base | Pointer to the screen buffer. |
| bitmap | Pointer to the bitmap to be drawn. |
| x_offset | X-coordinate of the top-left corner of the bitmap (must be in-bounds). |
| y_offset | Y-coordinate of the top-left corner of the bitmap (must be in-bounds). |
| draw_mode | The drawing mode (SET or UNSET). |
| void drawHorizontalLine | ( | Screen * | base, |
| u16 | y_pos, | ||
| u16 | x_start, | ||
| u16 | x_end, | ||
| BitMapDrawMode | mode ) |
Draws a horizontal line on the screen.
| base | Pointer to the screen buffer. |
| y_pos | Y-coordinate of the line (must be in-bounds). |
| x_start | Starting X-coordinate (must be in-bounds, x_start < x_end). |
| x_end | Ending X-coordinate (must be in-bounds). |
Draws a vertical line on the screen.
| base | Pointer to the screen buffer. |
| x_pos | X-coordinate of the line (must be in-bounds). |
| y_start | Starting Y-coordinate (must be in-bounds, y_start < y_end). |
| y_end | Ending Y-coordinate (must be in-bounds). |
Sets a pixel at the specified coordinates to a given color.
| base | Pointer to the screen buffer. |
| x | X-coordinate of the pixel (must be in-bounds & multiple of 8). |
| y | Y-coordinate of the pixel (must be in-bounds & multiple of 8). |
| color | The color to set the pixel to. |
| void white_screen | ( | Screen * | base | ) |
Clears the entire screen by filling it with white.
| base | Pointer to the screen buffer. |