From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/gio/cursor/gtrset.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sys/gio/cursor/gtrset.x (limited to 'sys/gio/cursor/gtrset.x') diff --git a/sys/gio/cursor/gtrset.x b/sys/gio/cursor/gtrset.x new file mode 100644 index 00000000..629ef097 --- /dev/null +++ b/sys/gio/cursor/gtrset.x @@ -0,0 +1,28 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include "gtr.h" + +# GTRSET -- Set the workstation transformation. The workstation transformation +# is automatically zeroed whenever the screen is cleared or when a workstation +# is opened. + +procedure gtrset (fd, x1, x2, y1, y2) + +int fd # graphics stream to be set +real x1, x2 # range of workstation viewport in X +real y1, y2 # range of workstation viewport in Y +include "gtr.com" + +begin + mx1 = x1 * GKI_MAXNDC + mx2 = x2 * GKI_MAXNDC + my1 = y1 * GKI_MAXNDC + my2 = y2 * GKI_MAXNDC + + xscale = GKI_MAXNDC / (mx2 - mx1) + yscale = GKI_MAXNDC / (my2 - my1) + + wstranset = YES +end -- cgit