aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/iis/src/zoom.x
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/images/tv/iis/src/zoom.x')
-rw-r--r--pkg/images/tv/iis/src/zoom.x60
1 files changed, 60 insertions, 0 deletions
diff --git a/pkg/images/tv/iis/src/zoom.x b/pkg/images/tv/iis/src/zoom.x
new file mode 100644
index 00000000..c7e7bff7
--- /dev/null
+++ b/pkg/images/tv/iis/src/zoom.x
@@ -0,0 +1,60 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <ctotok.h>
+include <ctype.h>
+include <gki.h>
+include "../lib/ids.h"
+
+# ZOOM -- zoom, then pan, the display. If zoom power == 1, then
+# don't bother panning.
+
+procedure zoom()
+
+char token[SZ_LINE]
+int tok, count, power, cnum
+short frames[IDS_MAXIMPL+2] # frames, graphics, EOD
+real x, y
+int ctoi, ip
+
+include "cv.com"
+
+begin
+ # get power for zoom
+
+ call gargtok (tok, token, SZ_LINE)
+ if (tok != TOK_NUMBER) {
+ call eprintf ("Bad zoom power: %s\n")
+ call pargstr (token)
+ return
+ }
+ ip = 1
+ count = ctoi(token, ip, power)
+
+ # which frames to zoom
+
+ frames[1] = IDS_EOD # default all frames
+ call gargtok (tok, token, SZ_LINE)
+ call strlwr (token)
+ if (token[1] == 'f') {
+ call cv_frame (token[2], frames)
+ if (frames[1] == ERR)
+ return
+ } else if (tok == TOK_NUMBER) {
+ call cv_frame (token[1], frames)
+ if (frames[1] == ERR)
+ return
+ } else {
+ call eprintf ("Unexpected input: %s\n")
+ call pargstr (token)
+ return
+ }
+
+ # where to zoom ... find which frame to read cursor position from
+
+ cnum = frames[1]
+ if (cnum == IDS_EOD)
+ cnum = 0
+ call cv_rcur (cnum, x, y)
+ call cvzoom (frames, power, x, y)
+ call pansub (frames)
+end