pcadmin/src/bar/draw.c

16 lines
360 B
C

#include "bar.h"
#include <gint/display.h>
void
bar_draw(struct Bar bar)
{
const int height = bar.fill * (float)bar.height;
const int y = bar.y + bar.height - height;
/* fill */
drect(bar.x, y, bar.x + BAR_WIDTH, y + height, C_GREEN);
/* borders */
drect_border(bar.x, bar.y, bar.x + BAR_WIDTH, bar.y + bar.height,
C_NONE, 2, C_BLACK);
}