9 frinit(Frame *f, Rectangle r, Font *ft, Image *b, Image *cols[NCOL])
12 f->display = b->display;
13 f->maxtab = 8*stringwidth(ft, "0");
23 memmove(f->cols, cols, sizeof f->cols);
25 if(f->tick==nil && f->cols[BACK]!=0)
35 b = f->display->screenimage;
39 f->tick = allocimage(f->display, Rect(0, 0, FRTICKW, ft->height), b->chan, 0, DWhite);
43 freeimage(f->tickback);
44 f->tickback = allocimage(f->display, f->tick->r, b->chan, 0, DWhite);
50 /* background color */
51 draw(f->tick, f->tick->r, f->cols[BACK], nil, ZP);
53 draw(f->tick, Rect(FRTICKW/2, 0, FRTICKW/2+1, ft->height), f->cols[TEXT], nil, ZP);
55 draw(f->tick, Rect(0, 0, FRTICKW, FRTICKW), f->cols[TEXT], nil, ZP);
56 draw(f->tick, Rect(0, ft->height-FRTICKW, FRTICKW, ft->height), f->cols[TEXT], nil, ZP);
60 frsetrects(Frame *f, Rectangle r, Image *b)
65 f->r.max.y -= (r.max.y-r.min.y)%f->font->height;
66 f->maxlines = (r.max.y-r.min.y)/f->font->height;
70 frclear(Frame *f, int freeall)
73 _frdelbox(f, 0, f->nbox-1);
78 freeimage(f->tickback);