Files
OBD2-car-display/due_obd2/bars.h
Sem van der Hoeven cf24296f63 bars
2024-11-12 00:14:45 +01:00

34 lines
1.4 KiB
C

#ifndef BARS_H
#define BARS_H
#include <UTFT.h>
/**
* @brief Draws a horizontal bar on the display
* @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 The value to be displayed
* @param max_value The maximum value of the bar
* @param color The color of the bar
* @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);
/**
* @brief Draws a vertical bar on the display
* @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 The value to be displayed
* @param max_value The maximum value of the bar
* @param color The color of the bar
* @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);
#endif