resize window to fit image (Erik Quanstrom)

This commit is contained in:
rsc 2006-02-15 12:11:03 +00:00
parent dfbfbecfc6
commit 846ec3d21d
4 changed files with 13 additions and 17 deletions

View file

@ -48,10 +48,10 @@ eresized(int new)
}
if(allims==nil || allims[which]==nil)
return;
r = imager();
border(screen, r, -Border, nil, ZP);
r.min.x += allims[which]->r.min.x - allims[0]->r.min.x;
r.min.y += allims[which]->r.min.y - allims[0]->r.min.y;
r = rectaddpt(allims[0]->r, subpt(screen->r.min, allims[0]->r.min));
if(!new)
drawresizewindow(r);
r = rectaddpt(r, subpt(allims[which]->r.min, allims[0]->r.min));
drawop(screen, r, allims[which], allmasks[which], allims[which]->r.min, S);
flushimage(display, 1);
}