henesyinit from p9fce6d0435 years agoHistory
18 lines · 477 B · C
RawDownload
#include <u.h>#include <libg.h> voidborder(Bitmap *l, Rectangle r, int i, Fcode c){	if(i < 0){		r = inset(r, i);		i = -i;	}	bitblt(l, r.min, l, Rect(r.min.x, r.min.y, r.max.x, r.min.y+i), c);	bitblt(l, Pt(r.min.x, r.max.y-i),		l, Rect(r.min.x, r.max.y-i, r.max.x, r.max.y), c);	bitblt(l, Pt(r.min.x, r.min.y+i),		l, Rect(r.min.x, r.min.y+i, r.min.x+i, r.max.y-i), c);	bitblt(l, Pt(r.max.x-i, r.min.y+i),		l, Rect(r.max.x-i, r.min.y+i, r.max.x, r.max.y-i), c);}