|
@@ -88,9 +88,12 @@ static void setup_dt()
|
|
|
|
|
|
static void draw()
|
|
static void draw()
|
|
{
|
|
{
|
|
|
|
+ dt_bbox bbox;
|
|
|
|
+
|
|
assert(!dt_draw(ctx, fnt, &style, 10, 50, TEXT));
|
|
assert(!dt_draw(ctx, fnt, &style, 10, 50, TEXT));
|
|
|
|
|
|
- XFillRectangle(dpy, win, gc, 5, 60, 400, 100);
|
|
|
|
|
|
+ assert(!dt_box(fnt, &bbox, TEXT));
|
|
|
|
+ XFillRectangle(dpy, win, gc, 10 + bbox.x, 90 + bbox.y, bbox.w, bbox.h);
|
|
assert(!dt_draw(ctx, fnt, &style_inv, 10, 90, TEXT));
|
|
assert(!dt_draw(ctx, fnt, &style_inv, 10, 90, TEXT));
|
|
|
|
|
|
XFlush(dpy);
|
|
XFlush(dpy);
|