add possibility to clear bars

This commit is contained in:
Sem van der Hoeven
2024-11-12 22:57:38 +01:00
parent cf24296f63
commit 21c166aadf
3 changed files with 88 additions and 20 deletions

View File

@@ -15,7 +15,7 @@
* @param fill_outline Whether to fill the outline of the bar
* @param display The display object
*/
void draw_bar_horizontal(int start_x, int start_y, int width, int height, int value, int max_value, uint color, char fill_outline, UTFT *display);
void bar_draw_horizontal(int start_x, int start_y, int width, int height, int value, int max_value, uint color, char fill_outline, UTFT *display);
/**
* @brief Draws a vertical bar on the display
@@ -29,6 +29,34 @@ void draw_bar_horizontal(int start_x, int start_y, int width, int height, int va
* @param fill_outline Whether to fill the outline of the bar
* @param display The display object
*/
void draw_bar_vertical(int start_x, int start_y, int width, int height, int value, int max_value, uint color, char fill_outline, UTFT *display);
void bar_draw_vertical(int start_x, int start_y, int width, int height, int value, int max_value, uint color, char fill_outline, UTFT *display);
/**
* @brief Clears a part of a horizontal bar
* @param start_x The start x position (top left)
* @param start_y The start y position (top left)
* @param width The width of the bar
* @param height The height of the bar
* @param value_from The value to start clearing from
* @param max_value The maximum value of the bar
* @param clear_color The color to clear the bar with
* @param clear_outline Whether to clear the outline of the bar
* @param display The display object
*/
void bar_clear_part_horizontal(int start_x, int start_y, int width, int height, int value_from, int max_value, char clear_color, char clear_outline, UTFT *display);
/**
* @brief Clears a part of a vertical bar
* @param start_x The start x position (top left)
* @param start_y The start y position (top left)
* @param width The width of the bar
* @param height The height of the bar
* @param value_from The value to start clearing from
* @param max_value The maximum value of the bar
* @param clear_color The color to clear the bar with
* @param clear_outline Whether to clear the outline of the bar
* @param display The display object
*/
void bar_clear_part_vertical(int start_x, int start_y, int width, int height, int value_from, int max_value, char clear_color, char clear_outline, UTFT *display);
#endif