aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/gim/gimrefpix.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/gio/gim/gimrefpix.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/gio/gim/gimrefpix.x')
-rw-r--r--sys/gio/gim/gimrefpix.x38
1 files changed, 38 insertions, 0 deletions
diff --git a/sys/gio/gim/gimrefpix.x b/sys/gio/gim/gimrefpix.x
new file mode 100644
index 00000000..1d906a1a
--- /dev/null
+++ b/sys/gio/gim/gimrefpix.x
@@ -0,0 +1,38 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <gescape.h>
+include <gim.h>
+include <gki.h>
+
+# GIM_REFRESHPIX -- Update any mappings defined upon the given region of
+# the given source raster, as if the pixel values had been set with a write
+# pixels call.
+
+procedure gim_refreshpix (gp, raster, ct, x1, y1, width, height)
+
+pointer gp #I graphics descriptor
+int raster #I raster number (0 is display window)
+int ct #I coordinate type
+real x1, y1 #I region to be refreshed
+real width, height #I region to be refreshed
+
+short gim[GIM_REFRESHPIXELS_LEN]
+
+begin
+ gim[GIM_REFRESHPIXELS_RN] = raster
+ gim[GIM_REFRESHPIXELS_CT] = ct
+
+ if (ct == CT_PIXEL) {
+ gim[GIM_REFRESHPIXELS_X1] = x1
+ gim[GIM_REFRESHPIXELS_Y1] = y1
+ gim[GIM_REFRESHPIXELS_NX] = width
+ gim[GIM_REFRESHPIXELS_NY] = height
+ } else {
+ gim[GIM_REFRESHPIXELS_X1] = x1 * GKI_MAXNDC
+ gim[GIM_REFRESHPIXELS_Y1] = y1 * GKI_MAXNDC
+ gim[GIM_REFRESHPIXELS_NX] = nint (width * GKI_MAXNDC)
+ gim[GIM_REFRESHPIXELS_NY] = nint (height * GKI_MAXNDC)
+ }
+
+ call gescape (gp, GIM_REFRESHPIXELS, gim, GIM_REFRESHPIXELS_LEN)
+end