|
@@ -24,8 +24,8 @@ GC gc;
|
|
|
|
|
|
dt_context *ctx;
|
|
dt_context *ctx;
|
|
dt_font *fnt;
|
|
dt_font *fnt;
|
|
-dt_style style;
|
|
|
|
-dt_style style_inv;
|
|
|
|
|
|
+dt_color color;
|
|
|
|
+dt_color color_inv;
|
|
|
|
|
|
static void setup_x();
|
|
static void setup_x();
|
|
static void setup_dt();
|
|
static void setup_dt();
|
|
@@ -83,25 +83,25 @@ static void setup_x()
|
|
|
|
|
|
static void setup_dt()
|
|
static void setup_dt()
|
|
{
|
|
{
|
|
- memset(&style, 0, sizeof(style));
|
|
|
|
- memset(&style_inv, 0, sizeof(style_inv));
|
|
|
|
- style_inv.red = 0xFF;
|
|
|
|
- style_inv.green = 0xFF;
|
|
|
|
- style_inv.blue = 0xFF;
|
|
|
|
|
|
+ memset(&color, 0, sizeof(color));
|
|
|
|
+ memset(&color_inv, 0, sizeof(color_inv));
|
|
|
|
+ color_inv.red = 0xFF;
|
|
|
|
+ color_inv.green = 0xFF;
|
|
|
|
+ color_inv.blue = 0xFF;
|
|
}
|
|
}
|
|
|
|
|
|
static void draw()
|
|
static void draw()
|
|
{
|
|
{
|
|
dt_bbox bbox;
|
|
dt_bbox bbox;
|
|
|
|
|
|
- assert(!dt_draw(ctx, fnt, &style, 10, 50, TEXT));
|
|
|
|
|
|
+ assert(!dt_draw(ctx, fnt, &color, 10, 50, TEXT));
|
|
|
|
|
|
assert(!dt_box(ctx, fnt, &bbox, TEXT));
|
|
assert(!dt_box(ctx, fnt, &bbox, TEXT));
|
|
XFillRectangle(dpy, win, gc, 10 + bbox.x, 100 + bbox.y, bbox.w, bbox.h);
|
|
XFillRectangle(dpy, win, gc, 10 + bbox.x, 100 + bbox.y, bbox.w, bbox.h);
|
|
- assert(!dt_draw(ctx, fnt, &style_inv, 10, 100, TEXT));
|
|
|
|
|
|
+ assert(!dt_draw(ctx, fnt, &color_inv, 10, 100, TEXT));
|
|
|
|
|
|
XFillRectangle(dpy, win, gc, 10 + bbox.x, 150 - fnt->ascent, bbox.w, fnt->height);
|
|
XFillRectangle(dpy, win, gc, 10 + bbox.x, 150 - fnt->ascent, bbox.w, fnt->height);
|
|
- assert(!dt_draw(ctx, fnt, &style_inv, 10, 150, TEXT));
|
|
|
|
|
|
+ assert(!dt_draw(ctx, fnt, &color_inv, 10, 150, TEXT));
|
|
|
|
|
|
XFlush(dpy);
|
|
XFlush(dpy);
|
|
}
|
|
}
|