p
This commit is contained in:
parent
9dd806b9fc
commit
a116c04ed9
20
bar.c
20
bar.c
@ -136,10 +136,7 @@ fill_gradient (xcb_drawable_t d, int x, int y, int width, int height, rgba_t sta
|
|||||||
void
|
void
|
||||||
fill_rect (xcb_drawable_t d, xcb_gcontext_t _gc, int x, int y, int width, int height)
|
fill_rect (xcb_drawable_t d, xcb_gcontext_t _gc, int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
rgba_t start = (rgba_t)0x222222U;
|
xcb_poly_fill_rectangle(c, d, _gc, 1, (const xcb_rectangle_t []){ { x, y, width, height } });
|
||||||
rgba_t end = (rgba_t)0x111111U;
|
|
||||||
fill_gradient(d, x, y, width, height, start, end);
|
|
||||||
// xcb_poly_fill_rectangle(c, d, _gc, 1, (const xcb_rectangle_t []){ { x, y, width, height } });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apparently xcb cannot seem to compose the right request for this call, hence we have to do it by
|
// Apparently xcb cannot seem to compose the right request for this call, hence we have to do it by
|
||||||
@ -198,6 +195,21 @@ typedef struct xbm_t {
|
|||||||
xbm_t xbm_cache[20];
|
xbm_t xbm_cache[20];
|
||||||
int xbm_cache_elem = 0;
|
int xbm_cache_elem = 0;
|
||||||
|
|
||||||
|
int
|
||||||
|
xbm_parse (char *path)
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
|
char line[4096];
|
||||||
|
int xbm_height, xcb_width;
|
||||||
|
|
||||||
|
fp = fopen(path, "r");
|
||||||
|
if (!fp)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
while (fgets(line, sizeof(line), fp)) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
xbm_t *
|
xbm_t *
|
||||||
xbm_load (uint8_t *bits, int width, int height)
|
xbm_load (uint8_t *bits, int width, int height)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user