diff options
author | rsc <devnull@localhost> | 2006-03-19 06:11:51 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-03-19 06:11:51 +0000 |
commit | 28a8042cec63a2868607328ff20cd44211d75122 (patch) | |
tree | ac23fbd749a3f3f76aaa7452c8bcf8e8f5c7387b /src/cmd/jpg | |
parent | acf8398fefe0b59da1ad20d06de5b11de3bdbc53 (diff) | |
download | plan9port-28a8042cec63a2868607328ff20cd44211d75122.tar.gz plan9port-28a8042cec63a2868607328ff20cd44211d75122.tar.bz2 plan9port-28a8042cec63a2868607328ff20cd44211d75122.zip |
autoresize (erik quanstrom)
Diffstat (limited to 'src/cmd/jpg')
-rw-r--r-- | src/cmd/jpg/bmp.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/gif.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/jpg.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/png.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/ppm.c | 7 |
5 files changed, 7 insertions, 8 deletions
diff --git a/src/cmd/jpg/bmp.c b/src/cmd/jpg/bmp.c index 4d6ddd9c..e9ab20c4 100644 --- a/src/cmd/jpg/bmp.c +++ b/src/cmd/jpg/bmp.c @@ -36,7 +36,7 @@ eresized(int new) if(image == nil) return; r = rectaddpt(image->r, subpt(screen->r.min, image->r.min)); - if(!new) + if(!new && !winsize) drawresizewindow(r); flushimage(display, 1); } diff --git a/src/cmd/jpg/gif.c b/src/cmd/jpg/gif.c index 29675118..d154740b 100644 --- a/src/cmd/jpg/gif.c +++ b/src/cmd/jpg/gif.c @@ -49,7 +49,7 @@ eresized(int new) if(allims==nil || allims[which]==nil) return; r = rectaddpt(allims[0]->r, subpt(screen->r.min, allims[0]->r.min)); - if(!new) + if(!new && !winsize) 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); diff --git a/src/cmd/jpg/jpg.c b/src/cmd/jpg/jpg.c index fafa9b8c..f74da4c5 100644 --- a/src/cmd/jpg/jpg.c +++ b/src/cmd/jpg/jpg.c @@ -38,7 +38,7 @@ eresized(int new) if(image == nil) return; r = rectaddpt(image->clipr, subpt(screen->r.min, image->clipr.min)); - if(!new) + if(!new && !winsize) drawresizewindow(r); draw(screen, r, image, nil, image->r.min); flushimage(display, 1); diff --git a/src/cmd/jpg/png.c b/src/cmd/jpg/png.c index 06cedc60..115524cd 100644 --- a/src/cmd/jpg/png.c +++ b/src/cmd/jpg/png.c @@ -36,7 +36,7 @@ eresized(int new) if(image == nil) return; r = rectaddpt(image->r, subpt(screen->r.min, image->r.min)); - if(!new) + if(!new && !winsize) drawresizewindow(r); draw(screen, r, image, nil, image->r.min); flushimage(display, 1); diff --git a/src/cmd/jpg/ppm.c b/src/cmd/jpg/ppm.c index d90344ed..c9c8d377 100644 --- a/src/cmd/jpg/ppm.c +++ b/src/cmd/jpg/ppm.c @@ -33,10 +33,9 @@ eresized(int new) } if(image == nil) return; - r = insetrect(screen->clipr, Edge+Border); - r.max.x = r.min.x+Dx(image->r); - r.max.y = r.min.y+Dy(image->r); - border(screen, r, -Border, nil, ZP); + r = rectaddpt(image->r, subpt(screen->r.min, image->r.min)); + if(!new && !winsize) + drawresizewindow(r); draw(screen, r, image, nil, image->r.min); flushimage(display, 1); } |