1 #include "lib9.h"
2 #include "draw.h"
3
4 void
replclipr(Image * i,int repl,Rectangle clipr)5 replclipr(Image *i, int repl, Rectangle clipr)
6 {
7 uchar *b;
8
9 b = bufimage(i->display, 22);
10 if (b == 0) {
11 _drawprint(2, "replclipr: no bufimage\n");
12 return;
13 }
14 b[0] = 'c';
15 BPLONG(b+1, i->id);
16 repl = repl!=0;
17 b[5] = repl;
18 BPLONG(b+6, clipr.min.x);
19 BPLONG(b+10, clipr.min.y);
20 BPLONG(b+14, clipr.max.x);
21 BPLONG(b+18, clipr.max.y);
22 i->repl = repl;
23 i->clipr = clipr;
24 }
25